15 Feb, 2017

1 commit

  • commit 01d4d673558985d9a118e1e05026633c3e2ade9b upstream.

    This patch addresses a long-standing bug with multi-session
    (eg: iscsi-target + iser-target) se_node_acl dynamic free
    withini transport_deregister_session().

    This bug is caused when a storage endpoint is configured with
    demo-mode (generate_node_acls = 1 + cache_dynamic_acls = 1)
    initiators, and initiator login creates a new dynamic node acl
    and attaches two sessions to it.

    After that, demo-mode for the storage instance is disabled via
    configfs (generate_node_acls = 0 + cache_dynamic_acls = 0) and
    the existing dynamic acl is never converted to an explicit ACL.

    The end result is dynamic acl resources are released twice when
    the sessions are shutdown in transport_deregister_session().

    If the storage instance is not changed to disable demo-mode,
    or the dynamic acl is converted to an explict ACL, or there
    is only a single session associated with the dynamic ACL,
    the bug is not triggered.

    To address this big, move the release of dynamic se_node_acl
    memory into target_complete_nacl() so it's only freed once
    when se_node_acl->acl_kref reaches zero.

    (Drop unnecessary list_del_init usage - HCH)

    Reported-by: Rob Millner
    Tested-by: Rob Millner
    Cc: Rob Millner
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Bellinger
     

20 Oct, 2016

1 commit

  • This patch addresses a bug where EXTENDED_COPY across multiple LUNs
    results in a CHECK_CONDITION when the source + destination are not
    located on the same physical node.

    ESX Host environments expect sense COPY_ABORTED w/ COPY TARGET DEVICE
    NOT REACHABLE to be returned when this occurs, in order to signal
    fallback to local copy method.

    As described in section 6.3.3 of spc4r22:

    "If it is not possible to complete processing of a segment because the
    copy manager is unable to establish communications with a copy target
    device, because the copy target device does not respond to INQUIRY,
    or because the data returned in response to INQUIRY indicates
    an unsupported logical unit, then the EXTENDED COPY command shall be
    terminated with CHECK CONDITION status, with the sense key set to
    COPY ABORTED, and the additional sense code set to COPY TARGET DEVICE
    NOT REACHABLE."

    Tested on v4.1.y with ESX v5.5u2+ with BlockCopy across multiple nodes.

    Reported-by: Nixon Vincent
    Tested-by: Nixon Vincent
    Cc: Nixon Vincent
    Tested-by: Dinesh Israni
    Signed-off-by: Dinesh Israni
    Cc: Dinesh Israni
    Cc: stable@vger.kernel.org # 3.14+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

20 Jul, 2016

3 commits

  • If a Simple command is sent with a failure, target_setup_cmd_from_cdb
    returns with TCM_UNSUPPORTED_SCSI_OPCODE or TCM_INVALID_CDB_FIELD.

    So in the cases where target_setup_cmd_from_cdb returns an error, we
    never get far enough to call target_execute_cmd to increment simple_cmds.
    Since simple_cmds isn't incremented, the result of the failure from
    target_setup_cmd_from_cdb causes transport_generic_request_failure to
    decrement simple_cmds, due to call to transport_complete_task_attr.

    With this dev->simple_cmds or dev->dev_ordered_sync is now -1, not 0.
    So when a subsequent command with an Ordered Task is sent, it causes
    a hang, since dev->simple_cmds is at -1.

    Tested-by: Bryant G. Ly
    Signed-off-by: Bryant G. Ly
    Tested-by: Michael Cyr
    Signed-off-by: Michael Cyr
    Cc: stable@vger.kernel.org # 4.4+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • If a command with a Simple task attribute is failed due to a Unit
    Attention, then a subsequent command with an Ordered task attribute
    will hang forever. The reason for this is that the Unit Attention
    status is checked for in target_setup_cmd_from_cdb, before the call
    to target_execute_cmd, which calls target_handle_task_attr, which
    in turn increments dev->simple_cmds.

    However, transport_generic_request_failure still calls
    transport_complete_task_attr, which will decrement dev->simple_cmds.
    In this case, simple_cmds is now -1. So when a command with the
    Ordered task attribute is sent, target_handle_task_attr sees that
    dev->simple_cmds is not 0, so it decides it can't execute the
    command until all the (nonexistent) Simple commands have completed.

    Reported-by: Michael Cyr
    Tested-by: Michael Cyr
    Reported-by: Bryant G. Ly
    Tested-by: Bryant G. Ly
    Cc: stable@vger.kernel.org # 4.4+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • max_discard_sectors only 32bits, and some non scsi backend
    devices will set this to the max 0xffffffff, so we can end up
    overflowing during the max_unmap_lba_count calculation.

    This fixes a regression caused by my patch:

    commit 8a9ebe717a133ba7bc90b06047f43cc6b8bcb8b3
    Author: Mike Christie
    Date: Mon Jan 18 14:09:27 2016 -0600

    target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors

    which can result in extra discards being sent to due the overflow
    causing max_unmap_lba_count to be smaller than what the backing
    device can actually support.

    Signed-off-by: Mike Christie
    Reviewed-by: Bart Van Assche
    Cc: stable@vger.kernel.org
    Signed-off-by: Nicholas Bellinger

    Mike Christie
     

29 May, 2016

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "Here are the outstanding target pending updates for v4.7-rc1.

    The highlights this round include:

    - Allow external PR/ALUA metadata path be defined at runtime via top
    level configfs attribute (Lee)
    - Fix target session shutdown bug for ib_srpt multi-channel (hch)
    - Make TFO close_session() and shutdown_session() optional (hch)
    - Drop se_sess->sess_kref + convert tcm_qla2xxx to internal kref
    (hch)
    - Add tcm_qla2xxx endpoint attribute for basic FC jammer (Laurence)
    - Refactor iscsi-target RX/TX PDU encode/decode into common code
    (Varun)
    - Extend iscsit_transport with xmit_pdu, release_cmd, get_rx_pdu,
    validate_parameters, and get_r2t_ttt for generic ISO offload
    (Varun)
    - Initial merge of cxgb iscsi-segment offload target driver (Varun)

    The bulk of the changes are Chelsio's new driver, along with a number
    of iscsi-target common code improvements made by Varun + Co along the
    way"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (29 commits)
    iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race
    cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute
    iscsi-target: Convert transport drivers to signal rdma_shutdown
    iscsi-target: Make iscsi_tpg_np driver show/store use generic code
    tcm_qla2xxx Add SCSI command jammer/discard capability
    iscsi-target: graceful disconnect on invalid mapping to iovec
    target: need_to_release is always false, remove redundant check and kfree
    target: remove sess_kref and ->shutdown_session
    iscsi-target: remove usage of ->shutdown_session
    tcm_qla2xxx: introduce a private sess_kref
    target: make close_session optional
    target: make ->shutdown_session optional
    target: remove acl_stop
    target: consolidate and fix session shutdown
    cxgbit: add files for cxgbit.ko
    iscsi-target: export symbols
    iscsi-target: call complete on conn_logout_comp
    iscsi-target: clear tx_thread_active
    iscsi-target: add new offload transport type
    iscsi-target: use conn_transport->transport_type in text rsp
    ...

    Linus Torvalds
     

17 May, 2016

2 commits


14 May, 2016

1 commit

  • The SRP target driver will need to allocate and chain it's own SGLs soon.
    For this export target_alloc_sgl, and add a new argument to it so that it
    can allocate an additional chain entry that doesn't point to a page. Also
    export transport_free_sgl after renaming it to target_free_sgl to free
    these SGLs again.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Christoph Hellwig
     

10 May, 2016

10 commits


31 Mar, 2016

2 commits


23 Mar, 2016

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "The highlights this round include:

    - Add target_alloc_session() w/ callback helper for doing se_session
    allocation + tag + se_node_acl lookup. (HCH + nab)

    - Tree-wide fabric driver conversion to use target_alloc_session()

    - Convert sbp-target to use percpu_ida tag pre-allocation, and
    TARGET_SCF_ACK_KREF I/O krefs (Chris Boot + nab)

    - Convert usb-gadget to use percpu_ida tag pre-allocation, and
    TARGET_SCF_ACK_KREF I/O krefs (Andrzej Pietrasiewicz + nab)

    - Convert xen-scsiback to use percpu_ida tag pre-allocation, and
    TARGET_SCF_ACK_KREF I/O krefs (Juergen Gross + nab)

    - Convert tcm_fc to use TARGET_SCF_ACK_KREF I/O + TMR krefs

    - Convert ib_srpt to use percpu_ida tag pre-allocation

    - Add DebugFS node for qla2xxx target sess list (Quinn)

    - Rework iser-target connection termination (Jenny + Sagi)

    - Convert iser-target to new CQ API (HCH)

    - Add pass-through WRITE_SAME support for IBLOCK (Mike Christie)

    - Introduce data_bitmap for asynchronous access of data area (Sheng
    Yang + Andy)

    - Fix target_release_cmd_kref shutdown comp leak (Himanshu Madhani)

    Also, there is a separate PULL request coming for cxgb4 NIC driver
    prerequisites for supporting hw iscsi segmentation offload (ISO), that
    will be the base for a number of v4.7 developments involving
    iscsi-target hw offloads"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (36 commits)
    target: Fix target_release_cmd_kref shutdown comp leak
    target: Avoid DataIN transfers for non-GOOD SAM status
    target/user: Report capability of handling out-of-order completions to userspace
    target/user: Fix size_t format-spec build warning
    target/user: Don't free expired command when time out
    target/user: Introduce data_bitmap, replace data_length/data_head/data_tail
    target/user: Free data ring in unified function
    target/user: Use iovec[] to describe continuous area
    target: Remove enum transport_lunflags_table
    target/iblock: pass WRITE_SAME to device if possible
    iser-target: Kill the ->isert_cmd back pointer in struct iser_tx_desc
    iser-target: Kill struct isert_rdma_wr
    iser-target: Convert to new CQ API
    iser-target: Split and properly type the login buffer
    iser-target: Remove ISER_RECV_DATA_SEG_LEN
    iser-target: Remove impossible condition from isert_wait_conn
    iser-target: Remove redundant wait in release_conn
    iser-target: Rework connection termination
    iser-target: Separate flows for np listeners and connections cma events
    iser-target: Add new state ISER_CONN_BOUND to isert_conn
    ...

    Linus Torvalds
     

18 Mar, 2016

2 commits

  • Pull configfs updates from Christoph Hellwig:

    - A large patch from me to simplify setting up the list of default
    groups by actually implementing it as a list instead of an array.

    - a small Y2083 prep patch from Deepa Dinamani. Probably doesn't
    matter on it's own, but it seems like he is trying to get rid of all
    CURRENT_TIME uses in file systems, which is a worthwhile goal.

    * tag 'configfs-for-linus' of git://git.infradead.org/users/hch/configfs:
    configfs: switch ->default groups to a linked list
    configfs: Replace CURRENT_TIME by current_fs_time()

    Linus Torvalds
     
  • Pull crypto update from Herbert Xu:
    "Here is the crypto update for 4.6:

    API:
    - Convert remaining crypto_hash users to shash or ahash, also convert
    blkcipher/ablkcipher users to skcipher.
    - Remove crypto_hash interface.
    - Remove crypto_pcomp interface.
    - Add crypto engine for async cipher drivers.
    - Add akcipher documentation.
    - Add skcipher documentation.

    Algorithms:
    - Rename crypto/crc32 to avoid name clash with lib/crc32.
    - Fix bug in keywrap where we zero the wrong pointer.

    Drivers:
    - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver.
    - Add PIC32 hwrng driver.
    - Support BCM6368 in bcm63xx hwrng driver.
    - Pack structs for 32-bit compat users in qat.
    - Use crypto engine in omap-aes.
    - Add support for sama5d2x SoCs in atmel-sha.
    - Make atmel-sha available again.
    - Make sahara hashing available again.
    - Make ccp hashing available again.
    - Make sha1-mb available again.
    - Add support for multiple devices in ccp.
    - Improve DMA performance in caam.
    - Add hashing support to rockchip"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
    crypto: qat - remove redundant arbiter configuration
    crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
    crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
    crypto: qat - Change the definition of icp_qat_uof_regtype
    hwrng: exynos - use __maybe_unused to hide pm functions
    crypto: ccp - Add abstraction for device-specific calls
    crypto: ccp - CCP versioning support
    crypto: ccp - Support for multiple CCPs
    crypto: ccp - Remove check for x86 family and model
    crypto: ccp - memset request context to zero during import
    lib/mpi: use "static inline" instead of "extern inline"
    lib/mpi: avoid assembler warning
    hwrng: bcm63xx - fix non device tree compatibility
    crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode.
    crypto: qat - The AE id should be less than the maximal AE number
    lib/mpi: Endianness fix
    crypto: rockchip - add hash support for crypto engine in rk3288
    crypto: xts - fix compile errors
    crypto: doc - add skcipher API documentation
    crypto: doc - update AEAD AD handling
    ...

    Linus Torvalds
     

11 Mar, 2016

1 commit

  • se_dev_entry.lun_flags and se_lun.lun_access are only used for keeping
    track of read-write vs. read-only state. Since this is an either/or thing
    we can represent it as bool, and remove the unneeded enum
    transport_lunflags_table, which is left over from when there were more
    flags.

    Change code that uses this enum to just use true/false, and make it clear
    through variable and param names that true means read-only, false means
    read-write.

    Signed-off-by: Andy Grover
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Andy Grover
     

06 Mar, 2016

1 commit

  • Replace the current NULL-terminated array of default groups with a linked
    list. This gets rid of lots of nasty code to size and/or dynamically
    allocate the array.

    While we're at it also provide a conveniant helper to remove the default
    groups.

    Signed-off-by: Christoph Hellwig
    Acked-by: Felipe Balbi [drivers/usb/gadget]
    Acked-by: Joel Becker
    Acked-by: Nicholas Bellinger
    Reviewed-by: Sagi Grimberg

    Christoph Hellwig
     

28 Feb, 2016

1 commit

  • Based on HCH's original patch, this adds a full version to
    support percpu-ida tag pre-allocation and callback function
    pointer into fabric driver code to complete session setup.

    Reported-by: Christoph Hellwig
    Cc: Sagi Grimberg
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Andy Grover
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

11 Feb, 2016

1 commit


07 Feb, 2016

1 commit


06 Feb, 2016

1 commit

  • To address the bug where fabric driver level shutdown
    of se_cmd occurs at the same time when TMR CMD_T_ABORTED
    is happening resulting in a -1 ->cmd_kref, this patch
    adds a CMD_T_FABRIC_STOP bit that is used to determine
    when TMR + driver I_T nexus shutdown is happening
    concurrently.

    It changes target_sess_cmd_list_set_waiting() to obtain
    se_cmd->cmd_kref + set CMD_T_FABRIC_STOP, and drop local
    reference in target_wait_for_sess_cmds() and invoke extra
    target_put_sess_cmd() during Task Aborted Status (TAS)
    when necessary.

    Also, it adds a new target_wait_free_cmd() wrapper around
    transport_wait_for_tasks() for the special case within
    transport_generic_free_cmd() to set CMD_T_FABRIC_STOP,
    and is now aware of CMD_T_ABORTED + CMD_T_TAS status
    bits to know when an extra transport_put_cmd() during
    TAS is required.

    Note transport_generic_free_cmd() is expected to block on
    cmd->cmd_wait_comp in order to follow what iscsi-target
    expects during iscsi_conn context se_cmd shutdown.

    Cc: Quinn Tran
    Cc: Himanshu Madhani
    Cc: Sagi Grimberg
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Andy Grover
    Cc: Mike Christie
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

04 Feb, 2016

1 commit

  • This patch fixes a NULL pointer se_cmd->cmd_kref < 0
    refcount bug during TMR LUN_RESET with active se_cmd
    I/O, that can be triggered during se_cmd descriptor
    shutdown + release via core_tmr_drain_state_list() code.

    To address this bug, add common __target_check_io_state()
    helper for ABORT_TASK + LUN_RESET w/ CMD_T_COMPLETE
    checking, and set CMD_T_ABORTED + obtain ->cmd_kref for
    both cases ahead of last target_put_sess_cmd() after
    TFO->aborted_task() -> transport_cmd_finish_abort()
    callback has completed.

    It also introduces SCF_ACK_KREF to determine when
    transport_cmd_finish_abort() needs to drop the second
    extra reference, ahead of calling target_put_sess_cmd()
    for the final kref_put(&se_cmd->cmd_kref).

    It also updates transport_cmd_check_stop() to avoid
    holding se_cmd->t_state_lock while dropping se_cmd
    device state via target_remove_from_state_list(), now
    that core_tmr_drain_state_list() is holding the
    se_device lock while checking se_cmd state from
    within TMR logic.

    Finally, move transport_put_cmd() release of SGL +
    TMR + extended CDB memory into target_free_cmd_mem()
    in order to avoid potential resource leaks in TMR
    ABORT_TASK + LUN_RESET code-paths. Also update
    target_release_cmd_kref() accordingly.

    Reviewed-by: Quinn Tran
    Cc: Himanshu Madhani
    Cc: Sagi Grimberg
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Andy Grover
    Cc: Mike Christie
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

30 Jan, 2016

1 commit

  • In a couple places we are not converting to/from the Linux
    block layer 512 bytes sectors.

    1.

    The request queue values and what we do are a mismatch of
    things:

    max_discard_sectors - This is in linux block layer 512 byte
    sectors. We are just copying this to max_unmap_lba_count.

    discard_granularity - This is in bytes. We are converting it
    to Linux block layer 512 byte sectors.

    discard_alignment - This is in bytes. We are just copying
    this over.

    The problem is that the core LIO code exports these values in
    spc_emulate_evpd_b0 and we use them to test request arguments
    in sbc_execute_unmap, but we never convert to the block size
    we export to the initiator. If we are not using 512 byte sectors
    then we are exporting the wrong values or are checks are off.
    And, for the discard_alignment/bytes case we are just plain messed
    up.

    2.

    blkdev_issue_discard's start and number of sector arguments
    are supposed to be in linux block layer 512 byte sectors. We are
    currently passing in the values we get from the initiator which
    might be based on some other sector size.

    There is a similar problem in iblock_execute_write_same where
    the bio functions want values in 512 byte sectors but we are
    passing in what we got from the initiator.

    Signed-off-by: Mike Christie
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Mike Christie
     

27 Jan, 2016

1 commit


21 Jan, 2016

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "The highlights this round include:

    - Introduce configfs support for unlocked configfs_depend_item()
    (krzysztof + andrezej)
    - Conversion of usb-gadget target driver to new function registration
    interface (andrzej + sebastian)
    - Enable qla2xxx FC target mode support for Extended Logins (himansu +
    giridhar)
    - Enable qla2xxx FC target mode support for Exchange Offload (himansu +
    giridhar)
    - Add qla2xxx FC target mode irq affinity notification + selective
    command queuing. (quinn + himanshu)
    - Fix iscsi-target deadlock in se_node_acl configfs deletion (sagi +
    nab)
    - Convert se_node_acl configfs deletion + se_node_acl->queue_depth to
    proper se_session->sess_kref + target_get_session() usage. (hch +
    sagi + nab)
    - Fix long-standing race between se_node_acl->acl_kref get and
    get_initiator_node_acl() lookup. (hch + nab)
    - Fix target/user block-size handling, and make sure netlink reaches
    all network namespaces (sheng + andy)

    Note there is an outstanding bug-fix series for remote I_T nexus port
    TMR LUN_RESET has been posted and still being tested, and will likely
    become post -rc1 material at this point"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (56 commits)
    scsi: qla2xxxx: avoid type mismatch in comparison
    target/user: Make sure netlink would reach all network namespaces
    target: Obtain se_node_acl->acl_kref during get_initiator_node_acl
    target: Convert ACL change queue_depth se_session reference usage
    iscsi-target: Fix potential dead-lock during node acl delete
    ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage
    tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage
    tcm_fc: Wait for command completion before freeing a session
    target: Fix a memory leak in target_dev_lba_map_store()
    target: Support aborting tasks with a 64-bit tag
    usb/gadget: Remove set-but-not-used variables
    target: Remove an unused variable
    target: Fix indentation in target_core_configfs.c
    target/user: Allow user to set block size before enabling device
    iser-target: Fix non negative ERR_PTR isert_device_get usage
    target/fcoe: Add tag support to tcm_fc
    qla2xxx: Check for online flag instead of active reset when transmitting responses
    qla2xxx: Set all queues to 4k
    qla2xxx: Disable ZIO at start time.
    qla2xxx: Move atioq to a different lock to reduce lock contention
    ...

    Linus Torvalds
     

20 Jan, 2016

2 commits

  • This patch addresses a long standing race where obtaining
    se_node_acl->acl_kref in __transport_register_session()
    happens a bit too late, and leaves open the potential
    for core_tpg_del_initiator_node_acl() to hit a NULL
    pointer dereference.

    Instead, take ->acl_kref in core_tpg_get_initiator_node_acl()
    while se_portal_group->acl_node_mutex is held, and move the
    final target_put_nacl() from transport_deregister_session()
    into transport_free_session() so that fabric driver login
    failure handling using the modern method to still work
    as expected.

    Also, update core_tpg_get_initiator_node_acl() to take
    an extra reference for dynamically generated acls for
    demo-mode, before returning to fabric caller. Also
    update iscsi-target sendtargets special case handling
    to use target_tpg_has_node_acl() when checking if
    demo_mode_discovery == true during discovery lookup.

    Note the existing wait_for_completion(&acl->acl_free_comp)
    in core_tpg_del_initiator_node_acl() does not change.

    Cc: Sagi Grimberg
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Andy Grover
    Cc: Mike Christie
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch converts core_tpg_set_initiator_node_queue_depth()
    to use struct se_node_acl->acl_sess_list when performing
    explicit se_tpg_tfo->shutdown_session() for active sessions,
    in order for new se_node_acl->queue_depth to take effect.

    This follows how core_tpg_del_initiator_node_acl() currently
    works when invoking se_tpg_tfo->shutdown-session(), and ahead
    of the next patch to take se_node_acl->acl_kref during lookup,
    the extra get_initiator_node_acl() can go away. In order to
    achieve this, go ahead and change target_get_session() to use
    kref_get_unless_zero() and propigate up the return value
    to know when a session is already being released.

    This is because se_node_acl->acl_group is already protecting
    se_node_acl->acl_group reference via configfs, and shutdown
    within core_tpg_del_initiator_node_acl() won't occur until
    sys_write() to core_tpg_set_initiator_node_queue_depth()
    attribute returns back to user-space.

    Also, drop the left-over iscsi-target hack, and obtain
    se_portal_group->session_lock in lio_tpg_shutdown_session()
    internally. Remove iscsi-target wrapper and unused se_tpg +
    force parameters and associated code.

    Reported-by: Christoph Hellwig
    Cc: Sagi Grimberg
    Cc: Hannes Reinecke
    Cc: Andy Grover
    Cc: Mike Christie
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

08 Jan, 2016

3 commits


07 Jan, 2016

1 commit