24 Mar, 2011

1 commit


25 Feb, 2011

3 commits

  • For drivers using the ep callbacks the addr and port
    are attached to the endpoint instead of the conn.
    This adds a callout to the iscsi_transport to get
    ep values. It also adds locking around the get
    param call to make sure that ep_disconnect does
    not free the LLD's ep interconnect structs from
    under us (the ep has a refcount so it will not
    go away but the LLD may have structs from other
    subsystems that are not allocated in the ep so
    we need to protect them from getting freed).

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

    Mike Christie
     
  • The active variable on the iscsi_cls_conn is not used
    so this patch removes it.

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

    Mike Christie
     
  • When iscsid restarts it does not know the connection's
    endpoint, so it is getting leaked. This fixes the problem
    by having the iscsi class force a disconnect before a
    new connection is bound.

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

    Mike Christie
     

22 Dec, 2010

1 commit

  • Since iscsi transport can be built as a module and uses netlink socket
    to communicate. The module should have an alias to autoload when socket
    of NETLINK_ISCSI type is requested.

    Signed-off-by: Stephen Hemminger
    Acked-by: Mike Christie
    Signed-off-by: James Bottomley

    Stephen Hemminger
     

10 Sep, 2010

1 commit


28 Jul, 2010

3 commits


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

05 Dec, 2009

2 commits

  • This patch modifies the replacement/recovery_timeout so it works
    more like the fc fast io fail tmo.

    If userspace tries to set the replacement/recovery_timeout to less than
    zero, we will turn off the forced recovery cleanup.

    If userspace sets the value to 0 then we will force the recovery
    cleanup immediately.

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

    Mike Christie
     
  • This implements warm target reset tmf support for
    the scsi-ml target reset callback. Previously we would
    just drop the session in that callback. This patch will
    now try a target reset and if that fails drop the session.

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

    Mike Christie
     

05 Sep, 2009

1 commit


31 Jul, 2009

1 commit


22 Jun, 2009

1 commit

  • setting err as -EOVERFLOW for Too many iscsi targets.

    Also fixes a spurious compiler warning for gcc 4.3.3 and gcc 4.4 :

    CC drivers/scsi/scsi_transport_iscsi.o
    drivers/scsi/scsi_transport_iscsi.c: In function ‘iscsi_add_session’:
    drivers/scsi/scsi_transport_iscsi.c:678: warning: ‘err’ may be used uninitialized in this function

    Signed-off-by: Jaswinder Singh Rajput
    Acked-by: Mike Christie
    Signed-off-by: James Bottomley

    Jaswinder Singh Rajput
     

09 Jun, 2009

1 commit


24 May, 2009

1 commit

  • When we create the tcp/ip connection by calling ep_connect, we currently
    just go by the routing table info.

    I think there are two problems with this.

    1. Some drivers do not have access to a routing table. Some drivers like
    qla4xxx do not even know about other ports.

    2. If you have two initiator ports on the same subnet, the user may have
    set things up so that session1 was supposed to be run through port1. and
    session2 was supposed to be run through port2. It looks like we could
    end with both sessions going through one of the ports.

    Fixes for cxgb3i from Karen Xie.

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

    Mike Christie
     

16 May, 2009

1 commit

  • Andrew Vasquez wrote:
    > fc-transport: Close state transition-window during rport deletion.
    >
    > After an rport's state has transitioned to FC_PORTSTATE_BLOCKED,
    > but, prior to making the upcall to 'block' the scsi-target
    > associated with an rport, queued commands can recycle and
    > ultimately run out of retries causing failures to propagate to
    > upper-level drivers. Close this transition-window by returning
    > the non-'retries' modifying DID_IMM_RETRY status for submitted
    > I/Os.

    The same can happen for iscsi when transitioning from logged in
    to failed and blocking the sdevs.

    This patch converts iscsi and fc's transitions back to use DID_IMM_RETRY
    instead of DID_TRANSPORT_DISRUPTED which has a limited number of retries
    that we do not want to use for handling this race.

    Signed-off-by: Andrew Vasquez
    [Addition of iscsi and fc port online devloss case conversion by Mike Christie]
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Andrew Vasquez
     

29 Mar, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (119 commits)
    [SCSI] scsi_dh_rdac: Retry for NOT_READY check condition
    [SCSI] mpt2sas: make global symbols unique
    [SCSI] sd: Make revalidate less chatty
    [SCSI] sd: Try READ CAPACITY 16 first for SBC-2 devices
    [SCSI] sd: Refactor sd_read_capacity()
    [SCSI] mpt2sas v00.100.11.15
    [SCSI] mpt2sas: add MPT2SAS_MINOR(221) to miscdevice.h
    [SCSI] ch: Add scsi type modalias
    [SCSI] 3w-9xxx: add power management support
    [SCSI] bsg: add linux/types.h include to bsg.h
    [SCSI] cxgb3i: fix function descriptions
    [SCSI] libiscsi: fix possbile null ptr session command cleanup
    [SCSI] iscsi class: remove host no argument from session creation callout
    [SCSI] libiscsi: pass session failure a session struct
    [SCSI] iscsi lib: remove qdepth param from iscsi host allocation
    [SCSI] iscsi lib: have lib create work queue for transmitting IO
    [SCSI] iscsi class: fix lock dep warning on logout
    [SCSI] libiscsi: don't cap queue depth in iscsi modules
    [SCSI] iscsi_tcp: replace scsi_debug/tcp_debug logging with iscsi conn logging
    [SCSI] libiscsi_tcp: replace tcp_debug/scsi_debug logging with session/conn logging
    ...

    Linus Torvalds
     

14 Mar, 2009

2 commits


06 Feb, 2009

1 commit

  • Currently, netlink_broadcast() reports errors to the caller if no
    messages at all were delivered:

    1) If, at least, one message has been delivered correctly, returns 0.
    2) Otherwise, if no messages at all were delivered due to skb_clone()
    failure, return -ENOBUFS.
    3) Otherwise, if there are no listeners, return -ESRCH.

    With this patch, the caller knows if the delivery of any of the
    messages to the listeners have failed:

    1) If it fails to deliver any message (for whatever reason), return
    -ENOBUFS.
    2) Otherwise, if all messages were delivered OK, returns 0.
    3) Otherwise, if no listeners, return -ESRCH.

    In the current ctnetlink code and in Netfilter in general, we can add
    reliable logging and connection tracking event delivery by dropping the
    packets whose events were not successfully delivered over Netlink. Of
    course, this option would be settable via /proc as this approach reduces
    performance (in terms of filtered connections per seconds by a stateful
    firewall) but providing reliable logging and event delivery (for
    conntrackd) in return.

    This patch also changes some clients of netlink_broadcast() that
    may report ENOBUFS errors via printk. This error handling is not
    of any help. Instead, the userspace daemons that are listening to
    those netlink messages should resync themselves with the kernel-side
    if they hit ENOBUFS.

    BTW, netlink_broadcast() clients include those that call
    cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they
    internally call netlink_broadcast() and return its error value.

    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     

03 Jan, 2009

1 commit


13 Oct, 2008

3 commits


04 Oct, 2008

1 commit

  • This patch cleans up the behavior of scsi_host_lookup().

    The original implementation attempted to use the dual role of
    either returning a pointer value, or a negative error code.
    User's needed to use IS_ERR() to check the result. Additionally,
    the IS_ERR() macro never checks for when a NULL pointer was
    returned, so a NULL pointer actually passes with a success case.
    Note: scsi_host_get(), used by scsi_host_lookup(), can return
    a NULL pointer.

    Talk about a mudhole for the unitiated to step into....

    This patch converts scsi_host_lookup() to return either NULL
    or a valid pointer. The consumers were updated for the change.

    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     

22 Jul, 2008

2 commits


12 Jul, 2008

11 commits