28 Jul, 2010

16 commits

  • Exploit the cio siosl function to trigger logging in the FCP channel
    on qdio error conditions. Add a helper function in zfcp_qdio to ensure
    that tracing is only triggered once before calling qdio_shutdown.

    Trigger in zfcp for hardware logs are:
    - timeout for FSF requests to the FCP channel
    - "no recommendation" status from FCP channel
    - invalid FSF protocol status
    - stalled outbound queue
    - unknown request id on inbound queue
    - QDIO_ERROR_SLSB_STATE

    All of the above triggers run from the Linux qdio softirq context, so
    no additional synchronization is necessary for the handling of the
    ZFCP_STATUS_ADAPTER_SIOSL_ISSUED flag.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Introduce support for DIF/DIX in zfcp: Report the capabilities for the
    Scsi_host, map the protection data when issuing I/O requests and
    handle the new error codes. Also add the fsf data_direction field to
    the hba trace, it is useful information for debugging in that area.
    This is an EXPERIMENTAL feature for now.

    Signed-off-by: Felix Beck
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Felix Beck
     
  • Try to enable data division support for FCP devices and indicate in
    the adapter status flag if it succeeded.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Initialize allocated memory to zero to prevent access on error. This
    prevents a possible error in the error handling path.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • Post FC transport class netlink events for usage in the userspace,
    e.g. for HBAAPI. Supported events are those required for the
    polled events in HBAAPI.
    - link up
    - link down
    - incoming RSCN
    (events related to FC-AL are not supported, as zfcp has no support for FC-AL)

    Signed-off-by: Sven Schuetz
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Sven Schuetz
     
  • Some definitions and structures in the zfcp QDIO processing are
    improved by the removal of not required variables and processing steps.
    I addition the naming of some variables is changed to make their purpose
    more clear.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • A lot of functions require the amount of SBALs as one of their
    parameter which is most times invariable. Therefore remove this
    parameter and set the SBAL value explicitly if a non standard value is
    required. In addition the warning message "oversized data" is
    replaced with a BUG_ON() statement assuring the limits defined and
    requested by zfcp.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     
  • The timer_interval is 14 bits in width. Introduce a define for
    properly masking the value.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Configuring a LUN in zfcp, also creates a SCSI device. For
    consistency, it makes sense to remove the SCSI device when the LUN is
    deconfigured. Replace the flush_work with the call to
    scsi_remove_device: scsi_remove_device also takes the scan_mutex that
    synchronizes itself with any long running device discovery.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Use the functions memdup_user and kstrdup to allocate memory and copy
    the data in one step, saving some lines of code.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Trying to enqueue a port erp action from the port erp strategy will
    fail in zfcp_erp_required_act. To try the same action again, return
    ZFCP_ERP_FAILED.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • After a timeout notification, do not try to run the erp strategy.
    Return from the erp with "failed" to possibly trigger a retry.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • When running in non-NPIV mode, the port_reopen in terminate_rport_io
    might succeed even though the remote port is not available. If the
    same port connection is held open from another operating system, the
    reopen is only a virtual operation and might not hit the SAN. Fix this
    by changing the call to forced_reopen that forces a logout/login
    operation in the SAN.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • When the successful return of an adisc is the final step to set the
    port online, the registration of SCSI devices might be omitted. SCSI
    devices that have been removed before (due to a short dev_loss_tmo
    setting) might not be attached again.

    The problem is that the registration of SCSI devices is done only
    after erp has finished. The correct place would be after the call to
    fc_remote_port_add to mimick the scan in the FC transport class.

    Change the registration of SCSI devices to be triggered after the
    fc_remote_port_add call. For the initial inquiry command to succeed,
    the unit must also be open. If the unit reopen is still pending, the
    inquiry command to the LUN will be deferred with DID_IMM_RETRY, so
    there is no harm from this approach.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • When the port is already "physically closed" try the reopen instead.
    There is no way to send a "physically close" to an already closed
    port.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • When the REOPEN_PORT_FORCED erp action succeeds, the port has been
    closed. A REOPEN_PORT will try to open the port after the
    REPORT_PORT_FORCED. The rport should only be unblocked after the
    successful completion of the reopen port.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     

22 Jul, 2010

3 commits

  • Commit 64deb6efdc5504ce97b5c1c6f281fffbc150bd93 changed the way status
    read buffers are handled but forgot to adjust the mempool to the new
    size. Add the call to resize the mempool after the exchange config
    data. Also use the define instead of the hard coded number in the fsf
    callback for consistency.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • Trying to read the FC host statistics on an offline adapter results in
    a 5 seconds wait. Reading the statistics tries to issue an exchange
    port data request which first waits up to 5 seconds for an entry in
    the request queue.

    Change the strategy for getting a free SBAL to exit when the queue is
    stopped. Reading the statistics will then fail without the wait.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     
  • A false check was performed whether an unchained ct_els
    is possible or not.

    Signed-off-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Swen Schillig
     

21 May, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (182 commits)
    [SCSI] aacraid: add an ifdef'd device delete case instead of taking the device offline
    [SCSI] aacraid: prohibit access to array container space
    [SCSI] aacraid: add support for handling ATA pass-through commands.
    [SCSI] aacraid: expose physical devices for models with newer firmware
    [SCSI] aacraid: respond automatically to volumes added by config tool
    [SCSI] fcoe: fix fcoe module ref counting
    [SCSI] libfcoe: FIP Keep-Alive messages for VPorts are sent with incorrect port_id and wwn
    [SCSI] libfcoe: Fix incorrect MAC address clearing
    [SCSI] fcoe: fix a circular locking issue with rtnl and sysfs mutex
    [SCSI] libfc: Move the port_id into lport
    [SCSI] fcoe: move link speed checking into its own routine
    [SCSI] libfc: Remove extra pointer check
    [SCSI] libfc: Remove unused fc_get_host_port_type
    [SCSI] fcoe: fixes wrong error exit in fcoe_create
    [SCSI] libfc: set seq_id for incoming sequence
    [SCSI] qla2xxx: Updates to ISP82xx support.
    [SCSI] qla2xxx: Optionally disable target reset.
    [SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive
    [SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.
    [SCSI] qla2xxx: T10 DIF support added.
    ...

    Linus Torvalds
     

18 May, 2010

1 commit


17 May, 2010

1 commit


03 May, 2010

5 commits


12 Apr, 2010

1 commit

  • When a FSF request is returned with an error it should be reported
    through blktrace for the ziomon tools, but the latency information
    should not be read. Fix this by also calling zfcp_fsf_req_trace for
    the error case, but skip reading the latencies inside the function.

    Reviewed-by: Swen Schillig
    Signed-off-by: Christof Schmitt
    Signed-off-by: James Bottomley

    Christof Schmitt
     

11 Apr, 2010

1 commit


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
     

08 Mar, 2010

1 commit


27 Feb, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (158 commits)
    [SCSI] Fix printing of failed 32-byte commands
    [SCSI] Fix printing of variable length commands
    [SCSI] libsrp: fix bug in ADDITIONAL CDB LENGTH interpretation
    [SCSI] scsi_dh_alua: Add IBM Power Virtual SCSI ALUA device to dev list
    [SCSI] scsi_dh_alua: add netapp to dev list
    [SCSI] qla2xxx: Update version number to 8.03.02-k1.
    [SCSI] qla2xxx: EEH: Restore PCI saved state during pci slot reset.
    [SCSI] qla2xxx: Add firmware ETS burst support.
    [SCSI] qla2xxx: Correct loop-resync issues during SNS scans.
    [SCSI] qla2xxx: Correct use-after-free issue in terminate_rport_io callback.
    [SCSI] qla2xxx: Correct EH bus-reset handling.
    [SCSI] qla2xxx: Proper clean-up of BSG requests when request times out.
    [SCSI] qla2xxx: Initialize payload receive length in failure path of vendor commands
    [SCSI] fix duplicate removal on error path in scsi_sysfs_add_sdev
    [SCSI] fix refcounting bug in scsi_get_host_dev
    [SCSI] fix memory leak in scsi_report_lun_scan
    [SCSI] lpfc: correct PPC build failure
    [SCSI] raid_class: add raid1e
    [SCSI] mpt2sas: Do not call sas_is_tlr_enabled for RAID volumes.
    [SCSI] zfcp: Introduce header file for qdio structs and inline functions
    ...

    Linus Torvalds
     

18 Feb, 2010

8 commits