07 Aug, 2011

2 commits

  • * 'for-linus' of git://git.open-osd.org/linux-open-osd:
    ore: Make ore its own module
    exofs: Rename raid engine from exofs/ios.c => ore
    exofs: ios: Move to a per inode components & device-table
    exofs: Move exofs specific osd operations out of ios.c
    exofs: Add offset/length to exofs_get_io_state
    exofs: Fix truncate for the raid-groups case
    exofs: Small cleanup of exofs_fill_super
    exofs: BUG: Avoid sbi realloc
    exofs: Remove pnfs-osd private definitions
    nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4

    Linus Torvalds
     
  • ORE stands for "Objects Raid Engine"

    This patch is a mechanical rename of everything that was in ios.c
    and its API declaration to an ore.c and an osd_ore.h header. The ore
    engine will later be used by the pnfs objects layout driver.

    * File ios.c => ore.c

    * Declaration of types and API are moved from exofs.h to a new
    osd_ore.h

    * All used types are prefixed by ore_ from their exofs_ name.

    * Shift includes from exofs.h to osd_ore.h so osd_ore.h is
    independent, include it from exofs.h.

    Other than a pure rename there are no other changes. Next patch
    will move the ore into it's own module and will export the API
    to be used by exofs and later the layout driver

    Signed-off-by: Boaz Harrosh

    Boaz Harrosh
     

31 Jul, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (71 commits)
    [SCSI] fcoe: cleanup cpu selection for incoming requests
    [SCSI] fcoe: add fip retry to avoid missing critical keep alive
    [SCSI] libfc: fix warn on in lport retry
    [SCSI] libfc: Remove the reference to FCP packet from scsi_cmnd in case of error
    [SCSI] libfc: cleanup sending SRR request
    [SCSI] libfc: two minor changes in comments
    [SCSI] libfc, fcoe: ignore rx frame with wrong xid info
    [SCSI] libfc: release exchg cache
    [SCSI] libfc: use FC_MAX_ERROR_CNT
    [SCSI] fcoe: remove unused ptype field in fcoe_rcv_info
    [SCSI] bnx2fc: Update copyright and bump version to 1.0.4
    [SCSI] bnx2fc: Tx BDs cache in write tasks
    [SCSI] bnx2fc: Do not arm CQ when there are no CQEs
    [SCSI] bnx2fc: hold tgt lock when calling cmd_release
    [SCSI] bnx2fc: Enable support for sequence level error recovery
    [SCSI] bnx2fc: HSI changes for tape
    [SCSI] bnx2fc: Handle REC_TOV error code from firmware
    [SCSI] bnx2fc: REC/SRR link service request and response handling
    [SCSI] bnx2fc: Support 'sequence cleanup' task
    [SCSI] dh_rdac: Associate HBA and storage in rdac_controller to support partitions in storage
    ...

    Linus Torvalds
     

28 Jul, 2011

2 commits


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

26 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     

25 Jul, 2011

3 commits

  • This patch moves the iscsi_sna_lt() and iscsi_sna_lte(), along with
    iscsi_sna_gt() and iscsi_sna_gte() from iscsi_target_mod into
    static inlines inside of include/scsi/iscsi_proto.h

    This patch also includes the ISCSI_HDR_LEN and ISCSI_CRC_LEN
    definitions.

    (Added JesperJ simpliciation for iscsi_sna_* usage)

    Signed-off-by: Mark Rustad
    Signed-off-by: Mike Christie
    Signed-off-by: Nicholas A. Bellinger

    Nicholas Bellinger
     
  • struct scsi_lun is also just a struct with an array of 8 octets (64 bits)
    but using it instead in iscsi structs lets us call scsilun_to_int
    without a cast, and also lets us copy it using assignment, instead of
    memcpy().

    Signed-off-by: Andy Grover
    Signed-off-by: James Bottomley

    Andy Grover
     
  • This patch renames the following iscsi_proto.h structures to avoid
    namespace issues with drivers/target/iscsi/iscsi_target_core.h:

    *) struct iscsi_cmd -> struct iscsi_scsi_req
    *) struct iscsi_cmd_rsp -> struct iscsi_scsi_rsp
    *) struct iscsi_login -> struct iscsi_login_req

    This patch includes useful ISCSI_FLAG_LOGIN_[CURRENT,NEXT]_STAGE*,
    and ISCSI_FLAG_SNACK_TYPE_* definitions used by iscsi_target_mod, and
    fixes the incorrect definition of struct iscsi_snack to following
    RFC-3720 Section 10.16. SNACK Request.

    Also, this patch updates libiscsi, iSER, be2iscsi, and bn2xi to
    use the updated structure definitions in a handful of locations.

    Signed-off-by: Mike Christie
    Signed-off-by: Nicholas A. Bellinger

    Nicholas Bellinger
     

21 Jul, 2011

1 commit

  • All these are instances of
    #define NAME value;
    or
    #define NAME(params_opt) value;

    These of course fail to build when used in contexts like
    if(foo $OP NAME)
    while(bar $OP NAME)
    and may silently generate the wrong code in contexts such as
    foo = NAME + 1; /* foo = value; + 1; */
    bar = NAME - 1; /* bar = value; - 1; */
    baz = NAME & quux; /* baz = value; & quux; */

    Reported on comp.lang.c,
    Message-ID:
    Initial analysis of the dangers provided by Keith Thompson in that thread.

    There are many more instances of more complicated macros having unnecessary
    trailing semicolons, but this pile seems to be all of the cases of simple
    values suffering from the problem. (Thus things that are likely to be found
    in one of the contexts above, more complicated ones aren't.)

    Signed-off-by: Phil Carmody
    Signed-off-by: Jiri Kosina

    Phil Carmody
     

30 Jun, 2011

2 commits


24 Jun, 2011

1 commit


27 May, 2011

1 commit

  • This allows a libsas driver to optionally provide a soft reset handler
    for libata to drive. The isci driver allows software to control the
    assertion/deassertion of SRST.

    [jejb: checkpatch.pl fixes]
    Signed-off-by: Dave Jiang
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dave Jiang
     

25 May, 2011

1 commit

  • This patch converts target core and follwing scsi-misc upstream fabric
    modules to use include/scsi/scsi_tcq.h includes for SIMPLE, HEAD_OF_QUEUE
    and ORDERED SCSI tasks instead of scsi/libsas.h with TASK_ATTR*

    *) tcm_loop: Convert tcm_loop_allocate_core_cmd() + tcm_loop_device_reset() to
    scsi_tcq.h
    *) tcm_fc: Convert ft_send_cmd() from FCP_PTA_* to scsi_tcq.h

    Reported-by: Christoph Hellwig
    Signed-off-by: Nicholas A. Bellinger
    Signed-off-by: James Bottomley

    Nicholas Bellinger
     

17 May, 2011

1 commit

  • Commit c21e6beb removed our queue request_fn re-enter
    protection, and defaulted to always running the queues from
    kblockd to be safe. This was a known potential slow down,
    but should be safe.

    Unfortunately this is causing big performance regressions for
    some, so we need to improve this logic. Looking into the details
    of the re-enter, the real issue is on requeue of requests.

    Requeue of requests upon seeing a BUSY condition from the device
    ends up re-running the queue, causing traces like this:

    scsi_request_fn()
    scsi_dispatch_cmd()
    scsi_queue_insert()
    __scsi_queue_insert()
    scsi_run_queue()
    scsi_request_fn()
    ...

    potentially causing the issue we want to avoid. So special
    case the requeue re-run of the queue, but improve it to offload
    the entire run of local queue and starved queue from a single
    workqueue callback. This is a lot better than potentially
    kicking off a workqueue run for each device seen.

    This also fixes the issue of the local device going into recursion,
    since the above mentioned commit never moved that queue run out
    of line.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

31 Mar, 2011

1 commit


24 Mar, 2011

2 commits

  • The xmit path can sleep with a page kmapped in the network
    xmit code while it waits for space to open up, so we have to use
    kmap instead of kmap atomic in that path.

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

    Mike Christie
     
  • During device discovery, scsi mid layer sends INQUIRY command to LUN
    0. If the LUN 0 is not mapped to host, it creates a temporary
    scsi_device with LUN id 0 and sends REPORT_LUNS command to it. After
    the REPORT_LUNS succeeds, it walks through the LUN table and adds each
    LUN found to sysfs. At the end of REPORT_LUNS lun table scan, it will
    delete the temporary scsi_device of LUN 0.

    When scsi devices are added to sysfs, it calls add_dev function of all
    the registered class interfaces. If ses driver has been registered,
    ses_intf_add() of ses module will be called. This function calls
    scsi_device_enclosure() to check the inquiry data for EncServ
    bit. Since inquiry was not allocated for temporary LUN 0 scsi_device,
    it will cause NULL pointer exception.

    To fix the problem, sdev->inquiry is checked for NULL before reading it.

    Signed-off-by: Somasundaram Krishnasamy
    Signed-off-by: Babu Moger
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Krishnasamy, Somasundaram
     

18 Mar, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (170 commits)
    [SCSI] scsi_dh_rdac: Add MD36xxf into device list
    [SCSI] scsi_debug: add consecutive medium errors
    [SCSI] libsas: fix ata list corruption issue
    [SCSI] hpsa: export resettable host attribute
    [SCSI] hpsa: move device attributes to avoid forward declarations
    [SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)
    [SCSI] sd: Logical Block Provisioning update
    [SCSI] Include protection operation in SCSI command trace
    [SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try)
    [SCSI] target: Fix volume size misreporting for volumes > 2TB
    [SCSI] bnx2fc: Broadcom FCoE offload driver
    [SCSI] fcoe: fix broken fcoe interface reset
    [SCSI] fcoe: precedence bug in fcoe_filter_frames()
    [SCSI] libfcoe: Remove stale fcoe-netdev entries
    [SCSI] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h
    [SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
    [SCSI] fcoe, libfc: initialize EM anchors list and then update npiv EMs
    [SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out"
    [SCSI] libfc: Fixing a memory leak when destroying an interface
    [SCSI] megaraid_sas: Version and Changelog update
    ...

    Fix up trivial conflicts due to whitespace differences in
    drivers/scsi/libsas/{sas_ata.c,sas_scsi_host.c}

    Linus Torvalds
     

02 Mar, 2011

1 commit

  • The conversion is quite complex given that the libata new error
    handler has to be hooked into the current libsas timeout and error
    handling. The way this is done is to process all the failed commands
    via libsas first, but if they have no underlying sas task (and they're
    on a sata device) assume they are destined for the libata error
    handler and send them accordingly.

    Finally, activate the port recovery of the libata error handler for
    each port known to the host. This is somewhat suboptimal, since that
    port may not need recovering, but given the current architecture of
    the libata error handler, it's the only way; and the spurious
    activation is harmless.

    Signed-off-by: James Bottomley
    Signed-off-by: Jeff Garzik

    James Bottomley
     

01 Mar, 2011

2 commits


26 Feb, 2011

1 commit


25 Feb, 2011

5 commits


14 Feb, 2011

1 commit

  • The conversion is quite complex given that the libata new error
    handler has to be hooked into the current libsas timeout and error
    handling. The way this is done is to process all the failed commands
    via libsas first, but if they have no underlying sas task (and they're
    on a sata device) assume they are destined for the libata error
    handler and send them accordingly.

    Finally, activate the port recovery of the libata error handler for
    each port known to the host. This is somewhat suboptimal, since that
    port may not need recovering, but given the current architecture of
    the libata error handler, it's the only way; and the spurious
    activation is harmless.

    Signed-off-by: James Bottomley

    James Bottomley
     

13 Feb, 2011

9 commits

  • To facilitate LLDDs to reuse the code, skb queue related functions are moved to
    libfcoe, so that both fcoe and bnx2fc drivers can use them. The common structures
    fcoe_port, fcoe_percpu_s are moved to libfcoe. fcoe_port will now have an
    opaque pointer that points to corresponding driver's interface structure.
    Also, fcoe_start_io and fcoe_fc_crc are moved to libfcoe.

    As part of this change, fixed fcoe_start_io to return ENOMEM if
    skb_clone fails.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • This patch enables LLD to listen to rport events and perform LLD
    specific operations based on the rport event. This patch also stores
    sp_features and spp_type in rdata for further reference by LLD.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • add the fcoe_transport struct to the common libfcoe.h header so all fcoe
    transport provides can use it to attach itself as an fcoe transport. This
    is the header part, and the next patch will be the transport code itself.

    Signed-off-by: Yi Zou
    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • Target modules using lport->tt.seq_assign() get a hold on the
    exchange but have no way of releasing it. Add that.

    Signed-off-by: Joe Eykholt
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • When an SCST provider is registered, it needs to know what
    local ports are available for configuration as targets.

    Add a notifier chain that is invoked when any local port
    that is added or deleted.

    Maintain a global list of local ports and add an
    interator function that calls a given function for
    every existing local port. This is used when first
    loading a provider.

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • The target provider needs a per-instance lookup table
    or other way to lookup sessions quickly without going through
    a linear list or serializing too much.

    Add a simple void * array indexed by FC-4 type to the fc_lport.

    Signed-off-by: Joe Eykholt
    Committed-by: Nicholas A. Bellinger
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • Add a method for setting handler for incoming exchange.
    For multi-sequence exchanges, this allows the target driver
    to add a response handler for handling subsequent sequences,
    and exchange manager resets.

    The new function is called fc_seq_set_resp().

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • Allow FC-4 provider modules to hook into libfc, mostly for targets.
    This should allow any FC-4 module to handle PRLI requests and maintain
    process-association states.

    Each provider registers its ops with libfc and then will be called for
    any incoming PRLI for that FC-4 type on any instance. The provider
    can decide whether to handle that particular instance using any method
    it likes, such as ACLs or other configuration information.

    A count is kept of the number of successful PRLIs from the remote port.
    Providers are called back with an implicit PRLO when the remote port
    is about to be deleted or has been reset.

    fc_lport_recv_req() now sends incoming FC-4 requests to FC-4 providers,
    and there is a built-in provider always registered for handling
    incoming ELS requests.

    The call to provider recv() routines uses rcu_read_lock()
    so that providers aren't removed during the call. That lock is very
    cheap and shouldn't affect any performance on ELS requests.
    Providers can rely on the RCU lock to protect a session lookup as well.

    Signed-off-by: Joe Eykholt
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Joe Eykholt
     
  • Instead of just passing 'EIO' for any I/O error we should be
    notifying the upper layers with more details about the cause
    of this error.

    Update the possible I/O errors to:

    - ENOLINK: Link failure between host and target
    - EIO: Retryable I/O error
    - EREMOTEIO: Non-retryable I/O error
    - EBADE: I/O error restricted to the I_T_L nexus

    'Retryable' in this context means that an I/O error _might_ be
    restricted to the I_T_L nexus (vulgo: path), so retrying on another
    nexus / path might succeed.

    'Non-retryable' in general refers to a target failure, so this
    error will always be generated regardless of the I_T_L nexus
    it was send on.

    I/O errors restricted to the I_T_L nexus might be retried
    on another nexus / path, but they should _not_ be queued
    if no paths are available.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Mike Snitzer
    Signed-off-by: James Bottomley

    Hannes Reinecke