10 Jan, 2014

1 commit

  • Move prototype declaration of function
    spc_parse_naa_6h_vendor_specific() from target_core_xcopy.c to header
    file target_core_pr.h because it is used by more than one file.

    This eliminates the following warning in target_core_spc.c:
    drivers/target/target_core_spc.c:138:6: warning: no previous prototype for ‘spc_parse_naa_6h_vendor_specific’ [-Wmissing-prototypes]

    Signed-off-by: Rashika Kheria
    Reviewed-by: Josh Triplett
    Signed-off-by: Nicholas Bellinger

    Rashika Kheria
     

23 Nov, 2013

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "Things have been quiet this round with mostly bugfixes, percpu
    conversions, and other minor iscsi-target conformance testing changes.

    The highlights include:

    - Add demo_mode_discovery attribute for iscsi-target (Thomas)
    - Convert tcm_fc(FCoE) to use percpu-ida pre-allocation
    - Add send completion interrupt coalescing for ib_isert
    - Convert target-core to use percpu-refcounting for se_lun
    - Fix mutex_trylock usage bug in iscsit_increment_maxcmdsn
    - tcm_loop updates (Hannes)
    - target-core ALUA cleanups + prep for v3.14 SCSI Referrals support (Hannes)

    v3.14 is currently shaping to be a busy development cycle in target
    land, with initial support for T10 Referrals and T10 DIF currently on
    the roadmap"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (40 commits)
    iscsi-target: chap auth shouldn't match username with trailing garbage
    iscsi-target: fix extract_param to handle buffer length corner case
    iscsi-target: Expose default_erl as TPG attribute
    target_core_configfs: split up ALUA supported states
    target_core_alua: Make supported states configurable
    target_core_alua: Store supported ALUA states
    target_core_alua: Rename ALUA_ACCESS_STATE_OPTIMIZED
    target_core_alua: spellcheck
    target core: rename (ex,im)plict -> (ex,im)plicit
    percpu-refcount: Add percpu-refcount.o to obj-y
    iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN
    iscsi-target: Convert iscsi_session statistics to atomic_long_t
    target: Convert se_device statistics to atomic_long_t
    target: Fix delayed Task Aborted Status (TAS) handling bug
    iscsi-target: Reject unsupported multi PDU text command sequence
    ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
    iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn
    target: Core does not need blkdev.h
    target: Pass through I/O topology for block backstores
    iser-target: Avoid using FRMR for single dma entry requests
    ...

    Linus Torvalds
     

09 Nov, 2013

1 commit


08 Nov, 2013

2 commits

  • Now with percpu refcounting for se_lun in place, go ahead and drop
    the legacy per se_cmd accounting for se_lun shutdown.

    This includes __transport_clear_lun_from_sessions(), the associated
    transport_lun_wait_for_tasks() logic, along with a handful of now
    unused se_cmd structure members and ->transport_state bits.

    Cc: Kent Overstreet
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch adds percpu refcounting for se_lun access that allows the
    association of an se_lun + se_cmd in transport_lookup_cmd_lun() to
    occur without an extra list_head for tracking outstanding I/O during
    se_lun shutdown.

    This effectively changes se_lun shutdown logic to wait for outstanding
    I/O percpu references to complete in transport_lun_remove_cmd() using
    se_lun->lun_ref_comp, instead of explicitly draining the per se_lun
    command list and waiting for individual se_cmd descriptor processing
    to complete.

    Cc: Kent Overstreet
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

24 Oct, 2013

3 commits

  • This patch adds an explicit check + failure for XCOPY I/O to source +
    destination devices with a non-matching block_size.

    This limitiation is currently due to the fact that the scatterlist
    memory allocated for the XCOPY READ operation is passed zero-copy
    to the XCOPY WRITE operation.

    Reported-by: Thomas Glanzmann
    Reported-by: Douglas Gilbert
    Cc: Thomas Glanzmann
    Cc: Douglas Gilbert
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch adds the missing non-zero se_cmd->scsi_status check required
    for local XCOPY I/O within target_xcopy_issue_pt_cmd() to signal an
    exception case failure.

    This will trigger the generation of SAM_STAT_CHECK_CONDITION status
    from within target_xcopy_do_work() process context code.

    Reported-by: Thomas Glanzmann
    Reported-by: Douglas Gilbert
    Cc: Thomas Glanzmann
    Cc: Douglas Gilbert
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch adds the missing xcopy_pt_cmd->sense_buffer[] required for
    correctly handling CHECK_CONDITION exceptions within the locally
    generated XCOPY I/O path.

    Also update target_xcopy_read_source() + target_xcopy_setup_pt_cmd()
    to pass this buffer into transport_init_se_cmd() to correctly setup
    se_cmd->sense_buffer.

    Reported-by: Thomas Glanzmann
    Reported-by: Douglas Gilbert
    Cc: Thomas Glanzmann
    Cc: Douglas Gilbert
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

09 Oct, 2013

3 commits

  • This patch rejects EXTENDED_COPY when the emulate_3pc attribute has
    been explicitly disabled for the receiving device.

    It also adds a similar check in target_xcopy_locate_se_dev_e4() to
    ignore these devices when doing a search based upon the identifier
    WWN provided by EXTENDED_COPY parameter list target descriptors.

    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch changes target_do_xcopy() to allow processing of non-zero
    ListIDs in EXTENDED_COPY parameter list data, instead of returning
    CHECK_CONDITION status.

    As the copy offload implementation reports SNLID=1 (Supports No ListID)
    in OPERATING PARAMETERS, any ListID value presented by the client is
    currently ignored.

    Also, properly extract list_id_usage for informational purposes.

    Reported-by: Thomas Glanzmann
    Reported-by: Douglas Gilbert
    Cc: Hannes Reinecke
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch changes target_do_xcopy() to properly return
    TCM_INVALID_PARAMETER_LIST instead of TCM_INVALID_CDB_FIELD
    for failures related to the EXTENDED_COPY parameter list parsing.

    Also, move struct xcopy_op allocation ahead of kmapping to
    handle the special TCM_OUT_OF_RESOURCES case.

    Reported-by: Thomas Glanzmann
    Reported-by: Douglas Gilbert
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

02 Oct, 2013

1 commit


11 Sep, 2013

2 commits

  • Remove including that don't need it.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Nicholas Bellinger

    Wei Yongjun
     
  • This patch adds support for EXTENDED_COPY emulation from SPC-3, that
    enables full copy offload target support within both a single virtual
    backend device, and across multiple virtual backend devices. It also
    functions independent of target fabric, and supports copy offload
    across multiple target fabric ports.

    This implemenation supports both EXTENDED_COPY PUSH and PULL models
    of operation, so the actual CDB may be received on either source or
    desination logical unit.

    For Target Descriptors, it currently supports the NAA IEEE Registered
    Extended designator (type 0xe4), which allows the reference of target
    ports to occur independent of fabric type using EVPD 0x83 WWNs.

    For Segment Descriptors, it currently supports copy from block to
    block (0x02) mode.

    It also honors any present SCSI reservations of the destination target
    port. Note that only Supports No List Identifier (SNLID=1) mode is
    supported.

    Also included is basic RECEIVE_COPY_RESULTS with service action type
    OPERATING PARAMETERS (0x03) required for SNLID=1 operation.

    v3 changes:
    - Fix incorrect return type in target_do_receive_copy_results()
    (Fengguang)

    v2 changes:
    - Use target_alloc_sgl() instead of transport_generic_get_mem()
    - Convert debug output to use pr_debug()
    - Convert target_xcopy_parse_target_descriptors() NAA IEEN WWN
    dump to use 0x%16phN format specification
    - Drop unnecessary xcopy_pt_cmd->xpt_passthrough_wsem, and
    associated usage in xcopy_pt_write_pending() and
    target_xcopy_issue_pt_cmd()
    - Add check for unsupported EXTENDED_COPY(LID4) service action
    bits in target_do_xcopy()

    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Martin Petersen
    Cc: Chris Mason
    Cc: Roland Dreier
    Cc: Zach Brown
    Cc: James Bottomley
    Cc: Nicholas Bellinger
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger