04 Dec, 2006

1 commit


26 Oct, 2006

1 commit


03 Sep, 2006

2 commits

  • It is possible that a ctask could be completing and getting
    cleaned up at the same time, we are finishing up the last
    data transfer. This could then result in the data transfer
    code using stale or invalid values. This patch adds a refcount
    to the ctask. When the count goes to zero then we know the
    transmit thread and recv thread or softirq are not touching
    it and we can safely release it.

    The eh should not need to grab a reference because it only cleans
    up a task if it has both the xmit mutex and recv lock (or recv
    side suspended).

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • iSCSI RFC states that the first burst length must be smaller than the
    max burst length. We currently assume targets will be good, but that may
    not be the case, so this patch adds a check.

    This patch also moves the unsol data out offset to the lib so the LLDs
    do not have to track it.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

29 Jul, 2006

3 commits

  • We currently try to allocate a max_recv_data_segment_length
    which can be very large (default is 64K), and common uses
    are up to 1MB. It is very very difficult to allocte this
    much contiguous memory and it turns out we never even use it.
    We really only need a couple of pages, so this patch has us
    allocates just what we know what we need today.

    Later if vendors start adding vendor specific data and
    we need to handle large buffers we can do this, but for
    the last 4 years we have not seen anyone do this or request
    it.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • Abort handler fixes.

    If a connection is dropped and reconnected while an abort is
    running then we should assume the recovery code will clean up
    the abort. Not doing so causes a oops.

    And if a command completes then we get the status for the abort, we do not
    need to call into the LLD to cleanup the resources. Doing this causes
    and oops in iser because it ends up freeing some resources twice.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • The iscsi tcp code can pluck multiple rt2s from the tasks's r2tqueue
    in the xmit code. This can result in the task being queued on the xmit queue
    but gettting completed at the same time.

    This patch fixes the above bug by making the fifo a list so
    we always remove the entry on the list del.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

29 Jun, 2006

1 commit

  • Reduce duplication in the software iscsi_transport modules by
    adding a libiscsi function to handle the common grunt work.

    This also has the drivers return specifc -EXXX values for different
    errors so userspace can finally handle them in a sane way.

    Also just pass the sysfs buffers to the drivers so HW iscsi can
    get/set its string values, like targetname, and initiatorname.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

06 Jun, 2006

1 commit

  • If recovery failed or we are in recovery only overwrite the state
    if we are going to terminate the session or if we logged back in.

    STOP_CONN_SUSPEND and conn_cnt are not used. We only support
    a single connection session ATM, so cleanup that code while
    we are working around it.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

20 May, 2006

1 commit

  • Do not flush queues then block session. This will cause commands
    to needlessly swing around on us and remove goofy
    recovery_failed field and replace with state value.

    And do not start recovery from within the host reset function.
    This causeis too many problems becuase open-iscsi was desinged to
    call out to userspace then have userpscae decide if we should
    go into recovery or kill the session.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

10 May, 2006

1 commit


15 Apr, 2006

1 commit

  • There is a lot of code duplcited between iscsi_tcp
    and the upcoming iscsi_iser driver. This patch puts
    the duplicated code in a lib. There is more code
    to move around but this takes care of the
    basics. For iscsi_offload if they use the lib we will
    probably move some things around. For example in the
    queuecommand we will not assume that the LLD wants
    to do queue_work, but it is better to handle that
    later when we know for sure what iscsi_offload looks
    like (we could probably do this for iscsi_iser though to).

    Ideally I would like to get the iscsi_transports modules
    to a place where all they really have to do is put data
    on the wire, but how to do that will hopefully be more clear
    when we see other modules like iscsi_offload. Or maybe
    iscsi_offload will not use the lib and it will just be
    iscsi_iser and iscsi_tcp and maybe the iscsi_tcp_tgt if that
    is allowed in mainline.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie