19 Apr, 2008

2 commits

  • - prepare the additional bidi_read rlength header.
    - access the right scsi_in() and/or scsi_out() side of things.
    also for resid.
    - Handle BIDI underflow overflow from target

    Signed-off-by: Boaz Harrosh
    Reviewed-by: Pete Wyckoff
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • Support for extended CDBs in iscsi.
    All we need is to check if command spills over 16 bytes then allocate
    an iscsi-extended-header for the leftovers.

    Signed-off-by: Boaz Harrosh
    Reviewed-by: Pete Wyckoff
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

28 Feb, 2008

1 commit


08 Feb, 2008

5 commits


12 Jan, 2008

15 commits

  • Replacing n & (n - 1) for power of 2 check by is_power_of_2(n)

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

    vignesh babu
     
  • Older tools will not be setting the tmf time outs since they
    did not exists, so set them to a safe default.

    And export abort and lu reset timeout values in sysfs.

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

    Mike Christie
     
  • Convert xmit to iscsi chunks.

    from michaelc@cs.wisc.edu:

    Bug fixes, more digest integration, sg chaining conversion and other
    sg wrapper changes, coding style sync up, and removal of io fields,
    like pdu_sent, that are not needed.

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

    Olaf Kirch
     
  • The driver does not need the host lock in queuecommand so drop it.

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

    Mike Christie
     
  • If the current ctask is failed early, we legt the conn->ctask pointer
    pointing to a invalid task. When the xmit thread would send data for
    it, we would then oops.

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

    Mike Christie
     
  • If the target requests a logout, then we do not want
    to fail commands to scsi-ml right away. This patch just
    fails in pending commands for a requeue immediately, and then lets
    iscsid handle running commands like normal recovery.

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

    Mike Christie
     
  • During root boot and shutdown the target could send us nops.
    At this time iscsid cannot be running, so the target will drop
    the session and the boot or shutdown will hang.

    To handle this and allow us to better control when to check the network
    this patch moves the nop handling to the kernel.

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

    Mike Christie
     
  • We were using the device delete sysfs file to remove each device
    then logout. Now in 2.6.21 this will not work because
    the sysfs delete file returns immediately and does not wait for
    the device removal to complete. This causes a hang if a cache sync
    is needed during shutdown. Before .21, that approach had other
    problems, so this patch fixes the shutdown code so that we remove the target
    and unbind the session before logging out and shut down the session

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

    Mike Christie
     
  • I thought we may not need the eh mutex during host reset, but that is wrong
    with the new shutdown code. When start_session_recovery sets the state to
    terminate then drops the session lock. The scsi eh thread could then grab the
    session lock see that we are terminating and then return failed to scsi-ml.
    scsi-ml's eh then owns the command and will do whatever it wants
    with it. But then the iscsi eh thread could grab the session lock
    and want to complete the scsi commands that we in the LLD, but
    it no longer owns them and kaboom.

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

    Mike Christie
     
  • There is not need to block the session during logout. Since
    we are going to fail the commands that were blocked just fail them
    immediately instead.

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

    Mike Christie
     
  • iscsi_pool_init simplified

    iscsi_pool_init currently has a lot of duplicate kfree() calls it does
    when some allocation fails. This patch simplifies the code a little by
    using iscsi_pool_free to tear down the pool in case of an error.

    iscsi_pool_init also returns a copy of the item array to the caller.
    Not all callers use this array, so we make it optional.

    Instead of allocating a second array and return that, allocate just one
    array, of twice the size.

    Update users of iscsi_pool_{init,free}

    This patch drops the (now useless) second argument to
    iscsi_pool_free, and updates all callers.

    It also removes the ctask->r2ts array, which was never
    used anyway. Since the items argument to iscsi_pool_init
    is now optional, we can pass NULL instead.

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

    Olaf Kirch
     
  • - The default initialization of hdr_max is the minimum -
    sizeof(struct iscsi_cmd) - Once this patch goes into iser the default
    initialization at libiscsi can be removed.
    - This is not yet full support for AHSs at iser end. But it should be easy.
    Just allocate more space at iser_desc right after iscsi_hdr. Than
    at transmission time use ctask->hdr_len to retrieve the total
    size of all iscsi pdu headers. See previous patch at iscsi_tcp.[ch]

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

    Boaz Harrosh
     
  • at libiscsi generic code
    - currently code assumes a storage space of pdu header is allocated
    at llds ctask and is pointed to by iscsi_cmd_task->hdr. Here I add
    a hdr_max field pertaining to that storage, and an hdr_len that
    accumulates the current use of the pdu-header.

    - Add an iscsi_next_hdr() inline which returns the next free space
    to write new Header at. Also iscsi_next_hdr() is used to retrieve
    the address at which to write the header-digest.

    - Add iscsi_add_hdr(length). What the user do is calls iscsi_next_hdr()
    for address of the new header, than calls iscsi_add_hdr(length) with
    the size of the new header. iscsi_add_hdr() will check if space is
    available and update to the new size. length must be padded according
    to standard.

    - Add 2 padding inline helpers thanks to Olaf. Current patch does not
    use them but Following patches will.
    Also moved definition of ISCSI_PAD_LEN to iscsi_proto.h which had
    PAD_WORD_LEN that was never used anywhere.

    - Let iscsi_prep_scsi_cmd_pdu() signal an Error return since now it is
    possible that it will fail.

    - I was tired of yet again writing a "this is a digest" comment next to
    sizeof(__u32) so I defined a new ISCSI_DIGEST_SIZE. Now I don't need
    any comments. Changed all places that used sizeof(__u32) or "4" in
    connection to a digest.

    iscsi_tcp specific code
    - At struct iscsi_tcp_cmd_task allocate maximum space allowed in
    standard for all headers following the iscsi_cmd header. and mark
    it so in iscsi_tcp_session_create()
    - At iscsi_send_cmd_hdr() retrieve the correct headers size and
    write header digest at iscsi_next_hdr().

    Signed-off-by: Boaz Harrosh
    Signed-off-by: Olaf Kirch
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • - Check to see that OVERFLOW is not negative indicating
    a bug.
    - Unify handling of UNDERFLOW and OVERFLOW to the same
    code.
    - Also handle BIDI_OVERFLOW.

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

    Boaz Harrosh
     
  • This patch adds logical unit reset support. This should work for ib_iser,
    but I have not finished testing that driver so it is not hooked in yet.

    This patch also temporarily reverts the iscsi_tcp r2t write out patch.
    That code is completely rewritten in this patchset.

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

    Mike Christie
     

15 Nov, 2007

1 commit


16 Aug, 2007

2 commits


27 Jul, 2007

2 commits


18 Jun, 2007

1 commit


03 Jun, 2007

3 commits

  • iSCSI must support software iscsi (iscsi_tcp, iser), hardware iscsi (qla4xxx),
    and partial offload (broadcom). To be able to allow each stack or driver
    or port (virtual or physical) to be able to log into the same target portal
    we use the initiator tuple [[HWADDRESS | NETDEVNAME], INITIATOR_NAME] and
    the target tuple [TARGETNAME, CONN_ADDRESS, CONN_PORT] to id a session.
    This patch adds the netdev name, which is used by software iscsi when
    it binds a session to a netdevice using the SO_BINDTODEVICE sock opt.
    It cannot use HWADDRESS because if someone did vlans then the same netdevice
    will have the same mac and the initiator,target id will not be unique.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Cc: David C Somayajulu
    Signed-off-by: James Bottomley

    Mike Christie
     
  • This patch allows us to set can_queue and cmds_per_lun from userspace
    when we create the session/host. From there we can set it on a per
    target basis. The patch fully converts iscsi_tcp, but only hooks
    up ib_iser for cmd_per_lun since it currently has a lots of preallocations
    based on can_queue.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Signed-off-by: James Bottomley

    Mike Christie
     
  • The cmdsn allocation and pdu transmit code can race, and we can end
    up sending a pdu with cmdsn 10 before a pdu with 5. The target will
    then fail the connection/session. This patch fixes the problem by
    delaying the cmdsn allocation until we are about to send the pdu.

    This also removes the xmitmutex. We were using the connection xmitmutex
    during error handling to handle races with mtask and ctask cleanup and
    completion. For ctasks we now have nice refcounting and for the mtask,
    if we hit the case where the mtask timesout and it is floating
    around somewhere in the driver, we end up dropping the session.
    And to handle session level cleanup, we use the xmit suspend bit
    along with scsi_flush_queue and the session lock to make sure
    that the xmit thread is not possibly transmitting a task while
    we are trying to kill it.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Signed-off-by: James Bottomley

    Mike Christie
     

02 Jun, 2007

6 commits


12 Mar, 2007

2 commits

  • Dave Miller meantioned that the data buffer in a past
    sense fixup patch was not gauranteed to be aligned
    properly for ia64. This patch has libiscsi use get_unalinged
    to make sure. There are a couple more places in the
    digest handling we may need to do this, but we are in the middle
    of fixing that code for big endien systems so just the sense
    access is fixed here.

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

    Mike Christie
     
  • This patch renames DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH to avoid
    confusion with the drivers default values (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
    is the iscsi RFC specific default).

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

    Mike Christie