19 Oct, 2014

1 commit

  • Pull core block layer changes from Jens Axboe:
    "This is the core block IO pull request for 3.18. Apart from the new
    and improved flush machinery for blk-mq, this is all mostly bug fixes
    and cleanups.

    - blk-mq timeout updates and fixes from Christoph.

    - Removal of REQ_END, also from Christoph. We pass it through the
    ->queue_rq() hook for blk-mq instead, freeing up one of the request
    bits. The space was overly tight on 32-bit, so Martin also killed
    REQ_KERNEL since it's no longer used.

    - blk integrity updates and fixes from Martin and Gu Zheng.

    - Update to the flush machinery for blk-mq from Ming Lei. Now we
    have a per hardware context flush request, which both cleans up the
    code should scale better for flush intensive workloads on blk-mq.

    - Improve the error printing, from Rob Elliott.

    - Backing device improvements and cleanups from Tejun.

    - Fixup of a misplaced rq_complete() tracepoint from Hannes.

    - Make blk_get_request() return error pointers, fixing up issues
    where we NULL deref when a device goes bad or missing. From Joe
    Lawrence.

    - Prep work for drastically reducing the memory consumption of dm
    devices from Junichi Nomura. This allows creating clone bio sets
    without preallocating a lot of memory.

    - Fix a blk-mq hang on certain combinations of queue depths and
    hardware queues from me.

    - Limit memory consumption for blk-mq devices for crash dump
    scenarios and drivers that use crazy high depths (certain SCSI
    shared tag setups). We now just use a single queue and limited
    depth for that"

    * 'for-3.18/core' of git://git.kernel.dk/linux-block: (58 commits)
    block: Remove REQ_KERNEL
    blk-mq: allocate cpumask on the home node
    bio-integrity: remove the needless fail handle of bip_slab creating
    block: include func name in __get_request prints
    block: make blk_update_request print prefix match ratelimited prefix
    blk-merge: don't compute bi_phys_segments from bi_vcnt for cloned bio
    block: fix alignment_offset math that assumes io_min is a power-of-2
    blk-mq: Make bt_clear_tag() easier to read
    blk-mq: fix potential hang if rolling wakeup depth is too high
    block: add bioset_create_nobvec()
    block: use bio_clone_fast() in blk_rq_prep_clone()
    block: misplaced rq_complete tracepoint
    sd: Honor block layer integrity handling flags
    block: Replace strnicmp with strncasecmp
    block: Add T10 Protection Information functions
    block: Don't merge requests if integrity flags differ
    block: Integrity checksum flag
    block: Relocate bio integrity flags
    block: Add a disk flag to block integrity profile
    block: Add prefix to block integrity profile flags
    ...

    Linus Torvalds
     

25 Sep, 2014

2 commits

  • With the recent addition of percpu_ref_reinit(), percpu_ref now can be
    used as a persistent switch which can be turned on and off repeatedly
    where turning off maps to killing the ref and waiting for it to drain;
    however, there currently isn't a way to initialize a percpu_ref in its
    off (killed and drained) state, which can be inconvenient for certain
    persistent switch use cases.

    Similarly, percpu_ref_switch_to_atomic/percpu() allow dynamic
    selection of operation mode; however, currently a newly initialized
    percpu_ref is always in percpu mode making it impossible to avoid the
    latency overhead of switching to atomic mode.

    This patch adds @flags to percpu_ref_init() and implements the
    following flags.

    * PERCPU_REF_INIT_ATOMIC : start ref in atomic mode
    * PERCPU_REF_INIT_DEAD : start ref killed and drained

    These flags should be able to serve the above two use cases.

    v2: target_core_tpg.c conversion was missing. Fixed.

    Signed-off-by: Tejun Heo
    Reviewed-by: Kent Overstreet
    Cc: Jens Axboe
    Cc: Christoph Hellwig
    Cc: Johannes Weiner

    Tejun Heo
     
  • …linux-block into for-3.18

    This is to receive 0a30288da1ae ("blk-mq, percpu_ref: implement a
    kludge for SCSI blk-mq stall during probe") which implements
    __percpu_ref_kill_expedited() to work around SCSI blk-mq stall. The
    commit reverted and patches to implement proper fix will be added.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Kent Overstreet <kmo@daterainc.com>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Christoph Hellwig <hch@lst.de>

    Tejun Heo
     

18 Sep, 2014

4 commits


16 Sep, 2014

1 commit

  • This patch adds a explicit check in iscsit_find_cmd_from_itt_or_dump()
    to ignore commands with ICF_GOT_LAST_DATAOUT set. This is done to
    address the case where an ITT is being reused for DataOUT, but the
    previous command with the same ITT has not yet been acknowledged by
    ExpStatSN and removed from the per connection command list.

    This issue was originally manifesting itself by referencing the
    previous command during ITT lookup, and subsequently hitting the
    check in iscsit_check_dataout_hdr() for ICF_GOT_LAST_DATAOUT, that
    resulted in the DataOUT PDU + associated payload being silently
    dumped.

    Reported-by: Arshad Hussain
    Tested-by: Arshad Hussain
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

08 Sep, 2014

1 commit

  • Percpu allocator now supports allocation mask. Add @gfp to
    percpu_ref_init() so that !GFP_KERNEL allocation masks can be used
    with percpu_refs too.

    This patch doesn't make any functional difference.

    v2: blk-mq conversion was missing. Updated.

    Signed-off-by: Tejun Heo
    Cc: Kent Overstreet
    Cc: Benjamin LaHaise
    Cc: Li Zefan
    Cc: Nicholas A. Bellinger
    Cc: Jens Axboe

    Tejun Heo
     

29 Aug, 2014

1 commit

  • The blk_get_request function may fail in low-memory conditions or during
    device removal (even if __GFP_WAIT is set). To distinguish between these
    errors, modify the blk_get_request call stack to return the appropriate
    ERR_PTR. Verify that all callers check the return status and consider
    IS_ERR instead of a simple NULL pointer check.

    For consistency, make a similar change to the blk_mq_alloc_request leg
    of blk_get_request. It may fail if the queue is dead, or the caller was
    unwilling to wait.

    Signed-off-by: Joe Lawrence
    Acked-by: Jiri Kosina [for pktdvd]
    Acked-by: Boaz Harrosh [for osd]
    Reviewed-by: Jeff Moyer
    Signed-off-by: Jens Axboe

    Joe Lawrence
     

07 Aug, 2014

1 commit

  • Pull SCSI updates from James Bottomley:
    "This patch set consists of the usual driver updates (ufs, storvsc,
    pm8001 hpsa). It also has removal of the user space target driver
    code (everyone is using LIO now), a partial PCI MSI-X update, more
    multi-queue updates, conversion to 64 bit LUNs (so we could
    theoretically cope with any LUN returned by a device) and placeholder
    support for the ZBC device type (Shingle drives), plus an assortment
    of minor updates and bug fixes"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (143 commits)
    scsi: do not issue SCSI RSOC command to Promise Vtrak E610f
    vmw_pvscsi: Use pci_enable_msix_exact() instead of pci_enable_msix()
    pm8001: Fix invalid return when request_irq() failed
    lpfc: Remove superfluous call to pci_disable_msix()
    isci: Use pci_enable_msix_exact() instead of pci_enable_msix()
    bfa: Use pci_enable_msix_exact() instead of pci_enable_msix()
    bfa: Cleanup bfad_setup_intr() function
    bfa: Do not call pci_enable_msix() after it failed once
    fnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
    scsi: use short driver name for per-driver cmd slab caches
    scsi_debug: support scsi-mq, queues and locks
    Drivers: add blist flags
    scsi: ufs: fix endianness sparse warnings
    scsi: ufs: make undeclared functions static
    bnx2i: Update driver version to 2.7.10.1
    pm8001: fix a memory leak in nvmd_resp
    pm8001: fix update_flash
    pm8001: fix a memory leak in flash_update
    pm8001: Cleaning up uninitialized variables
    pm8001: Fix to remove null pointer checks that could never happen
    ...

    Linus Torvalds
     

05 Aug, 2014

1 commit

  • Pull percpu updates from Tejun Heo:

    - Major reorganization of percpu header files which I think makes
    things a lot more readable and logical than before.

    - percpu-refcount is updated so that it requires explicit destruction
    and can be reinitialized if necessary. This was pulled into the
    block tree to replace the custom percpu refcnting implemented in
    blk-mq.

    - In the process, percpu and percpu-refcount got cleaned up a bit

    * 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (21 commits)
    percpu-refcount: implement percpu_ref_reinit() and percpu_ref_is_zero()
    percpu-refcount: require percpu_ref to be exited explicitly
    percpu-refcount: use unsigned long for pcpu_count pointer
    percpu-refcount: add helpers for ->percpu_count accesses
    percpu-refcount: one bit is enough for REF_STATUS
    percpu-refcount, aio: use percpu_ref_cancel_init() in ioctx_alloc()
    workqueue: stronger test in process_one_work()
    workqueue: clear POOL_DISASSOCIATED in rebind_workers()
    percpu: Use ALIGN macro instead of hand coding alignment calculation
    percpu: invoke __verify_pcpu_ptr() from the generic part of accessors and operations
    percpu: preffity percpu header files
    percpu: use raw_cpu_*() to define __this_cpu_*()
    percpu: reorder macros in percpu header files
    percpu: move {raw|this}_cpu_*() definitions to include/linux/percpu-defs.h
    percpu: move generic {raw|this}_cpu_*_N() definitions to include/asm-generic/percpu.h
    percpu: only allow sized arch overrides for {raw|this}_cpu_*() ops
    percpu: reorganize include/linux/percpu-defs.h
    percpu: move accessors from include/linux/percpu.h to percpu-defs.h
    percpu: include/asm-generic/percpu.h should contain only arch-overridable parts
    percpu: introduce arch_raw_cpu_ptr()
    ...

    Linus Torvalds
     

18 Jul, 2014

1 commit

  • The SCSI standard defines 64-bit values for LUNs, and large arrays
    employing large or hierarchical LUN numbers become more and more
    common.

    So update the linux SCSI stack to use 64-bit LUN numbers.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Ewan Milne
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     

28 Jun, 2014

3 commits

  • Currently, a percpu_ref undoes percpu_ref_init() automatically by
    freeing the allocated percpu area when the percpu_ref is killed.
    While seemingly convenient, this has the following niggles.

    * It's impossible to re-init a released reference counter without
    going through re-allocation.

    * In the similar vein, it's impossible to initialize a percpu_ref
    count with static percpu variables.

    * We need and have an explicit destructor anyway for failure paths -
    percpu_ref_cancel_init().

    This patch removes the automatic percpu counter freeing in
    percpu_ref_kill_rcu() and repurposes percpu_ref_cancel_init() into a
    generic destructor now named percpu_ref_exit(). percpu_ref_destroy()
    is considered but it gets confusing with percpu_ref_kill() while
    "exit" clearly indicates that it's the counterpart of
    percpu_ref_init().

    All percpu_ref_cancel_init() users are updated to invoke
    percpu_ref_exit() instead and explicit percpu_ref_exit() calls are
    added to the destruction path of all percpu_ref users.

    Signed-off-by: Tejun Heo
    Acked-by: Benjamin LaHaise
    Cc: Kent Overstreet
    Cc: Christoph Lameter
    Cc: Benjamin LaHaise
    Cc: Nicholas A. Bellinger
    Cc: Li Zefan

    Tejun Heo
     
  • On uniprocessor preemptible kernel, target core deadlocks on unload. The
    following events happen:
    * iscsit_del_np is called
    * it calls send_sig(SIGINT, np->np_thread, 1);
    * the scheduler switches to the np_thread
    * the np_thread is woken up, it sees that kthread_should_stop() returns
    false, so it doesn't terminate
    * the np_thread clears signals with flush_signals(current); and goes back
    to sleep in iscsit_accept_np
    * the scheduler switches back to iscsit_del_np
    * iscsit_del_np calls kthread_stop(np->np_thread);
    * the np_thread is waiting in iscsit_accept_np and it doesn't respond to
    kthread_stop

    The deadlock could be resolved if the administrator sends SIGINT signal to
    the np_thread with killall -INT iscsi_np

    The reproducible deadlock was introduced in commit
    db6077fd0b7dd41dc6ff18329cec979379071f87, but the thread-stopping code was
    racy even before.

    This patch fixes the problem. Using kthread_should_stop to stop the
    np_thread is unreliable, so we test np_thread_state instead. If
    np_thread_state equals ISCSI_NP_THREAD_SHUTDOWN, the thread exits.

    Signed-off-by: Mikulas Patocka
    Cc: stable@vger.kernel.org
    Signed-off-by: Nicholas Bellinger

    Mikulas Patocka
     
  • This patch changes iscsit_check_dataout_hdr() to dump the incoming
    Data-Out payload when the received ITT is not associated with a
    WRITE, instead of calling iscsit_reject_cmd() for the non WRITE
    ITT descriptor.

    This addresses a bug where an initiator sending an Data-Out for
    an ITT associated with a READ would end up generating a reject
    for the READ, eventually resulting in list corruption.

    Reported-by: Santosh Kulkarni
    Reported-by: Arshad Hussain
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

27 Jun, 2014

5 commits

  • This patch fixes a tcm_loop_cmd descriptor memory leak in the
    tcm_loop_submission_work() error path, and would result in
    warnings about leaked tcm_loop_cmd_cache objects at module
    unload time.

    Go ahead and invoke kmem_cache_free() to release tl_cmd back to
    tcm_loop_cmd_cache before calling sc->scsi_done().

    Reported-by: Sebastian Herbszt
    Tested-by: Sebastian Herbszt
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch adds a explicit memset to the login response PDU
    exception path in iscsit_tx_login_rsp().

    This addresses a regression bug introduced in commit baa4d64b
    where the initiator would end up not receiving the login
    response and associated status class + detail, before closing
    the login connection.

    Reported-by: Christophe Vu-Brugier
    Tested-by: Christophe Vu-Brugier
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch fixes a left-over se_lun->lun_sep pointer OOPs when one
    of the /sys/kernel/config/target/$FABRIC/$WWPN/$TPGT/lun/$LUN/alua*
    attributes is accessed after the $DEVICE symlink has been removed.

    To address this bug, go ahead and clear se_lun->lun_sep memory in
    core_dev_unexport(), so that the existing checks for show/store
    ALUA attributes in target_core_fabric_configfs.c work as expected.

    Reported-by: Sebastian Herbszt
    Tested-by: Sebastian Herbszt
    Cc: stable@vger.kernel.org
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch adds a check in chap_server_compute_md5() to enforce a
    1024 byte maximum for the CHAP_C key value following the requirement
    in RFC-3720 Section 11.1.4:

    "..., C and R are large-binary-values and their binary length (not
    the length of the character string that represents them in encoded
    form) MUST not exceed 1024 bytes."

    Reported-by: rahul.rane
    Tested-by: rahul.rane
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch converts chap_server_compute_md5() from simple_strtoul() to
    kstrtoul usage().

    This addresses the case where a empty 'CHAP_I=' key value received during
    mutual authentication would be converted to a '0' by simple_strtoul(),
    instead of failing the login attempt.

    Reported-by: Tejas Vaykole
    Tested-by: Tejas Vaykole
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

13 Jun, 2014

2 commits

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

    - Add support for T10 PI pass-through between vhost-scsi +
    virtio-scsi (MST + Paolo + MKP + nab)
    - Add support for T10 PI in qla2xxx target mode (Quinn + MKP + hch +
    nab, merged through scsi.git)
    - Add support for percpu-ida pre-allocation in qla2xxx target code
    (Quinn + nab)
    - A number of iser-target fixes related to hardening the network
    portal shutdown path (Sagi + Slava)
    - Fix response length residual handling for a number of control CDBs
    (Roland + Christophe V.)
    - Various iscsi RFC conformance fixes in the CHAP authentication path
    (Tejas and Calsoft folks + nab)
    - Return TASK_SET_FULL status for tcm_fc(FCoE) DataIn + Response
    failures (Vasu + Jun + nab)
    - Fix long-standing ABORT_TASK + session reset hang (nab)
    - Convert iser-initiator + iser-target to include T10 bytes into EDTL
    (Sagi + Or + MKP + Mike Christie)
    - Fix NULL pointer dereference regression related to XCOPY introduced
    in v3.15 + CC'ed to v3.12.y (nab)"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (34 commits)
    target: Fix NULL pointer dereference for XCOPY in target_put_sess_cmd
    vhost-scsi: Include prot_bytes into expected data transfer length
    TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire
    libiscsi, iser: Adjust data_length to include protection information
    scsi_cmnd: Introduce scsi_transfer_length helper
    target: Report correct response length for some commands
    target/sbc: Check that the LBA and number of blocks are correct in VERIFY
    target/sbc: Remove sbc_check_valid_sectors()
    Target/iscsi: Fix sendtargets response pdu for iser transport
    Target/iser: Fix a wrong dereference in case discovery session is over iser
    iscsi-target: Fix ABORT_TASK + connection reset iscsi_queue_req memory leak
    target: Use complete_all for se_cmd->t_transport_stop_comp
    target: Set CMD_T_ACTIVE bit for Task Management Requests
    target: cleanup some boolean tests
    target/spc: Simplify INQUIRY EVPD=0x80
    tcm_fc: Generate TASK_SET_FULL status for response failures
    tcm_fc: Generate TASK_SET_FULL status for DataIN failures
    iscsi-target: Reject mutual authentication with reflected CHAP_C
    iscsi-target: Remove no-op from iscsit_tpg_del_portal_group
    iscsi-target: Fix CHAP_A parameter list handling
    ...

    Linus Torvalds
     
  • This patch fixes a NULL pointer dereference regression bug that was
    introduced with:

    commit 1e1110c43b1cda9fe77fc4a04835e460550e6b3c
    Author: Mikulas Patocka
    Date: Sat May 17 06:49:22 2014 -0400

    target: fix memory leak on XCOPY

    Now that target_put_sess_cmd() -> kref_put_spinlock_irqsave() is
    called with a valid se_cmd->cmd_kref, a NULL pointer dereference
    is triggered because the XCOPY passthrough commands don't have
    an associated se_session pointer.

    To address this bug, go ahead and checking for a NULL se_sess pointer
    within target_put_sess_cmd(), and call se_cmd->se_tfo->release_cmd()
    to release the XCOPY's xcopy_pt_cmd memory.

    Reported-by: Thomas Glanzmann
    Cc: Thomas Glanzmann
    Cc: Mikulas Patocka
    Cc: stable@vger.kernel.org # 3.12+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

12 Jun, 2014

5 commits

  • In various areas of the code, it is assumed that
    se_cmd->data_length describes pure data. In case
    that protection information exists over the wire
    (protect bits is are on) the target core re-calculates
    the data length from the CDB and the backed device
    block size (instead of each transport peeking in the cdb).

    Modify loopback device to include protection information
    in the transferred data length (like other scsi transports).

    Signed-off-by: Sagi Grimberg
    Cc: stable@vger.kernel.org # 3.15+
    Signed-off-by: Nicholas Bellinger

    Sagi Grimberg
     
  • When an initiator sends an allocation length bigger than what its
    command consumes, the target should only return the actual response data
    and set the residual length to the unused part of the allocation length.

    Add a helper function that command handlers (INQUIRY, READ CAPACITY,
    etc) can use to do this correctly, and use this code to get the correct
    residual for commands that don't use the full initiator allocation in the
    handlers for READ CAPACITY, READ CAPACITY(16), INQUIRY, MODE SENSE and
    REPORT LUNS.

    This addresses a handful of failures as reported by Christophe with
    the Windows Certification Kit:

    http://permalink.gmane.org/gmane.linux.scsi.target.devel/6515

    Signed-off-by: Roland Dreier
    Tested-by: Christophe Vu-Brugier
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     
  • This patch extracts LBA + sectors for VERIFY, and adds a goto check_lba
    to perform the end-of-device checking.

    (Update patch to drop lba_check usage - nab)

    Signed-off-by: Christophe Vu-Brugier
    Signed-off-by: Nicholas Bellinger

    Christophe Vu-Brugier
     
  • A similar check is performed at the end of sbc_parse_cdb() and is now
    enforced if the SYNCHRONIZE CACHE command's backend supports
    ->execute_sync_cache().

    (Add check_lba goto to avoid *_max_sectors checks - nab)

    Signed-off-by: Christophe Vu-Brugier
    Signed-off-by: Nicholas Bellinger

    Christophe Vu-Brugier
     
  • In case the transport is iser we should not include the
    iscsi target info in the sendtargets text response pdu.
    This causes sendtargets response to include the target
    info twice.

    Modify iscsit_build_sendtargets_response to filter
    transport types that don't match.

    Signed-off-by: Sagi Grimberg
    Reported-by: Slava Shwartsman
    Cc: stable@vger.kernel.org # 3.11+
    Signed-off-by: Nicholas Bellinger

    Sagi Grimberg
     

11 Jun, 2014

1 commit

  • Pull block layer fixes from Jens Axboe:
    "Final small batch of fixes to be included before -rc1. Some general
    cleanups in here as well, but some of the blk-mq fixes we need for the
    NVMe conversion and/or scsi-mq. The pull request contains:

    - Support for not merging across a specified "chunk size", if set by
    the driver. Some NVMe devices perform poorly for IO that crosses
    such a chunk, so we need to support it generically as part of
    request merging avoid having to do complicated split logic. From
    me.

    - Bump max tag depth to 10Ki tags. Some scsi devices have a huge
    shared tag space. Before we failed with EINVAL if a too large tag
    depth was specified, now we truncate it and pass back the actual
    value. From me.

    - Various blk-mq rq init fixes from me and others.

    - A fix for enter on a dying queue for blk-mq from Keith. This is
    needed to prevent oopsing on hot device removal.

    - Fixup for blk-mq timer addition from Ming Lei.

    - Small round of performance fixes for mtip32xx from Sam Bradshaw.

    - Minor stack leak fix from Rickard Strandqvist.

    - Two __init annotations from Fabian Frederick"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: add __init to blkcg_policy_register
    block: add __init to elv_register
    block: ensure that bio_add_page() always accepts a page for an empty bio
    blk-mq: add timer in blk_mq_start_request
    blk-mq: always initialize request->start_time
    block: blk-exec.c: Cleaning up local variable address returnd
    mtip32xx: minor performance enhancements
    blk-mq: ->timeout should be cleared in blk_mq_rq_ctx_init()
    blk-mq: don't allow queue entering for a dying queue
    blk-mq: bump max tag depth to 10K tags
    block: add blk_rq_set_block_pc()
    block: add notion of a chunk size for request merging

    Linus Torvalds
     

10 Jun, 2014

3 commits

  • This patch fixes a iscsi_queue_req memory leak when ABORT_TASK response
    has been queued by TFO->queue_tm_rsp() -> lio_queue_tm_rsp() after a
    long standing I/O completes, but the connection has already reset and
    waiting for cleanup to complete in iscsit_release_commands_from_conn()
    -> transport_generic_free_cmd() -> transport_wait_for_tasks() code.

    It moves iscsit_free_queue_reqs_for_conn() after the per-connection command
    list has been released, so that the associated se_cmd tag can be completed +
    released by target-core before freeing any remaining iscsi_queue_req memory
    for the connection generated by lio_queue_tm_rsp().

    Cc: Thomas Glanzmann
    Cc: Charalampos Pournaris
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch fixes a bug where multiple waiters on ->t_transport_stop_comp
    occurs due to a concurrent ABORT_TASK and session reset both invoking
    transport_wait_for_tasks(), while waiting for the associated se_cmd
    descriptor backend processing to complete.

    For this case, complete_all() should be invoked in order to wake up
    both waiters in core_tmr_abort_task() + transport_generic_free_cmd()
    process contexts.

    Cc: Thomas Glanzmann
    Cc: Charalampos Pournaris
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch fixes a bug where se_cmd descriptors associated with a
    Task Management Request (TMR) where not setting CMD_T_ACTIVE before
    being dispatched into target_tmr_work() process context.

    This is required in order for transport_generic_free_cmd() ->
    transport_wait_for_tasks() to wait on se_cmd->t_transport_stop_comp
    if a session reset event occurs while an ABORT_TASK is outstanding
    waiting for another I/O to complete.

    Cc: Thomas Glanzmann
    Cc: Charalampos Pournaris
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

09 Jun, 2014

1 commit

  • Now that 3.15 is released, this merges the 'next' branch into 'master',
    bringing us to the normal situation where my 'master' branch is the
    merge window.

    * accumulated work in next: (6809 commits)
    ufs: sb mutex merge + mutex_destroy
    powerpc: update comments for generic idle conversion
    cris: update comments for generic idle conversion
    idle: remove cpu_idle() forward declarations
    nbd: zero from and len fields in NBD_CMD_DISCONNECT.
    mm: convert some level-less printks to pr_*
    MAINTAINERS: adi-buildroot-devel is moderated
    MAINTAINERS: add linux-api for review of API/ABI changes
    mm/kmemleak-test.c: use pr_fmt for logging
    fs/dlm/debug_fs.c: replace seq_printf by seq_puts
    fs/dlm/lockspace.c: convert simple_str to kstr
    fs/dlm/config.c: convert simple_str to kstr
    mm: mark remap_file_pages() syscall as deprecated
    mm: memcontrol: remove unnecessary memcg argument from soft limit functions
    mm: memcontrol: clean up memcg zoneinfo lookup
    mm/memblock.c: call kmemleak directly from memblock_(alloc|free)
    mm/mempool.c: update the kmemleak stack trace for mempool allocations
    lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations
    mm: introduce kmemleak_update_trace()
    mm/kmemleak.c: use %u to print ->checksum
    ...

    Linus Torvalds
     

07 Jun, 2014

4 commits

  • Convert "x == true" to "x" and "x == false" to "!x".

    Signed-off-by: Christophe Vu-Brugier
    Signed-off-by: Nicholas Bellinger

    Christophe Vu-Brugier
     
  • Signed-off-by: Christophe Vu-Brugier
    Signed-off-by: Nicholas Bellinger

    Christophe Vu-Brugier
     
  • This patch changes ft_queue_status() to set SAM_STAT_TASK_SET_FULL
    status upon lport->tt.seq_send( failure, and return -EAGAIN to notify
    target-core to attempt to requeue the response.

    It also does the same for a fc_frame_alloc() failures, in order to
    signal the initiator that it should try to reduce it's current
    queue_depth, to lower the number of outstanding I/Os on the wire.

    Reported-by: Vasu Dev
    Reviewed-by: Vasu Dev
    Cc: Jun Wu
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch changes ft_queue_data_in() to set SAM_STAT_TASK_SET_FULL
    status upon a lport->tt.seq_send() failure, where it will now stop
    sending subsequent DataIN, and immediately attempt to send the
    response with exception status.

    Sending a response with SAM_STAT_TASK_SET_FULL status is useful in
    order to signal the initiator that it should try to reduce it's
    current queue_depth, to lower the number of outstanding I/Os on
    the wire.

    Also, add a check to skip sending DataIN if TASK_SET_FULL status
    has already been set due to a response lport->tt.seq_send()
    failure, that has asked target-core to requeue a response.

    Reported-by: Vasu Dev
    Reviewed-by: Vasu Dev
    Cc: Jun Wu
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

06 Jun, 2014

3 commits

  • With the optimizations around not clearing the full request at alloc
    time, we are leaving some of the needed init for REQ_TYPE_BLOCK_PC
    up to the user allocating the request.

    Add a blk_rq_set_block_pc() that sets the command type to
    REQ_TYPE_BLOCK_PC, and properly initializes the members associated
    with this type of request. Update callers to use this function instead
    of manipulating rq->cmd_type directly.

    Includes fixes from Christoph Hellwig for my half-assed
    attempt.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This patch fixes a OOPs where an attempt to write to the per-device
    alua_access_state configfs attribute at:

    /sys/kernel/config/target/core/$HBA/$DEV/alua/$TG_PT_GP/alua_access_state

    results in an NULL pointer dereference when the backend device has not
    yet been configured.

    This patch adds an explicit check for DF_CONFIGURED, and fails with
    -ENODEV to avoid this case.

    Reported-by: Chris Boot
    Reported-by: Philip Gaw
    Cc: Chris Boot
    Cc: Philip Gaw
    Cc: stable@vger.kernel.org # 3.8+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch allows READ_CAPACITY + SAI_READ_CAPACITY_16 opcode
    processing to occur while the associated ALUA group is in Standby
    access state.

    This is required to avoid host side LUN probe failures during the
    initial scan if an ALUA group has already implicitly changed into
    Standby access state.

    This addresses a bug reported by Chris + Philip using dm-multipath
    + ESX hosts configured with ALUA multipath.

    Reported-by: Chris Boot
    Reported-by: Philip Gaw
    Cc: Chris Boot
    Cc: Philip Gaw
    Cc: Hannes Reinecke
    Cc: stable@vger.kernel.org
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger