04 Feb, 2018

1 commit


01 Feb, 2018

2 commits

  • Pull RDMA subsystem updates from Jason Gunthorpe:
    "Overall this cycle did not have any major excitement, and did not
    require any shared branch with netdev.

    Lots of driver updates, particularly of the scale-up and performance
    variety. The largest body of core work was Parav's patches fixing and
    restructing some of the core code to make way for future RDMA
    containerization.

    Summary:

    - misc small driver fixups to
    bnxt_re/hfi1/qib/hns/ocrdma/rdmavt/vmw_pvrdma/nes

    - several major feature adds to bnxt_re driver: SRIOV VF RoCE
    support, HugePages support, extended hardware stats support, and
    SRQ support

    - a notable number of fixes to the i40iw driver from debugging scale
    up testing

    - more work to enable the new hip08 chip in the hns driver

    - misc small ULP fixups to srp/srpt//ipoib

    - preparation for srp initiator and target to support the RDMA-CM
    protocol for connections

    - add RDMA-CM support to srp initiator, srp target is still a WIP

    - fixes for a couple of places where ipoib could spam the dmesg log

    - fix encode/decode of FDR/EDR data rates in the core

    - many patches from Parav with ongoing work to clean up
    inconsistencies and bugs in RoCE support around the rdma_cm

    - mlx5 driver support for the userspace features 'thread domain',
    'wallclock timestamps' and 'DV Direct Connected transport'. Support
    for the firmware dual port rocee capability

    - core support for more than 32 rdma devices in the char dev
    allocation

    - kernel doc updates from Randy Dunlap

    - new netlink uAPI for inspecting RDMA objects similar in spirit to 'ss'

    - one minor change to the kobject code acked by Greg KH"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (259 commits)
    RDMA/nldev: Provide detailed QP information
    RDMA/nldev: Provide global resource utilization
    RDMA/core: Add resource tracking for create and destroy PDs
    RDMA/core: Add resource tracking for create and destroy CQs
    RDMA/core: Add resource tracking for create and destroy QPs
    RDMA/restrack: Add general infrastructure to track RDMA resources
    RDMA/core: Save kernel caller name when creating PD and CQ objects
    RDMA/core: Use the MODNAME instead of the function name for pd callers
    RDMA: Move enum ib_cq_creation_flags to uapi headers
    IB/rxe: Change RDMA_RXE kconfig to use select
    IB/qib: remove qib_keys.c
    IB/mthca: remove mthca_user.h
    RDMA/cm: Fix access to uninitialized variable
    RDMA/cma: Use existing netif_is_bond_master function
    IB/core: Avoid SGID attributes query while converting GID from OPA to IB
    RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure
    IB/umad: Fix use of unprotected device pointer
    IB/iser: Combine substrings for three messages
    IB/iser: Delete an unnecessary variable initialisation in iser_send_data_out()
    IB/iser: Delete an error message for a failed memory allocation in iser_send_data_out()
    ...

    Linus Torvalds
     
  • Pull SCSI updates from James Bottomley:
    "This is mostly updates of the usual driver suspects: arcmsr,
    scsi_debug, mpt3sas, lpfc, cxlflash, qla2xxx, aacraid, megaraid_sas,
    hisi_sas.

    We also have a rework of the libsas hotplug handling to make it more
    robust, a slew of 32 bit time conversions and fixes, and a host of the
    usual minor updates and style changes. The biggest potential for
    regressions is the libsas hotplug changes, but so far they seem stable
    under testing"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (313 commits)
    scsi: qla2xxx: Fix logo flag for qlt_free_session_done()
    scsi: arcmsr: avoid do_gettimeofday
    scsi: core: Add VENDOR_SPECIFIC sense code definitions
    scsi: qedi: Drop cqe response during connection recovery
    scsi: fas216: fix sense buffer initialization
    scsi: ibmvfc: Remove unneeded semicolons
    scsi: hisi_sas: fix a bug in hisi_sas_dev_gone()
    scsi: hisi_sas: directly attached disk LED feature for v2 hw
    scsi: hisi_sas: devicetree: bindings: add LED feature for v2 hw
    scsi: megaraid_sas: NVMe passthrough command support
    scsi: megaraid: use ktime_get_real for firmware time
    scsi: fnic: use 64-bit timestamps
    scsi: qedf: Fix error return code in __qedf_probe()
    scsi: devinfo: fix format of the device list
    scsi: qla2xxx: Update driver version to 10.00.00.05-k
    scsi: qla2xxx: Add XCB counters to debugfs
    scsi: qla2xxx: Fix queue ID for async abort with Multiqueue
    scsi: qla2xxx: Fix warning for code intentation in __qla24xx_handle_gpdb_event()
    scsi: qla2xxx: Fix warning during port_name debug print
    scsi: qla2xxx: Fix warning in qla2x00_async_iocb_timeout()
    ...

    Linus Torvalds
     

31 Jan, 2018

1 commit


24 Jan, 2018

1 commit

  • Since the SRP_LOGIN_REQ defined in the SRP standard is larger than
    what fits in the RDMA/CM login request private data, introduce a new
    login request format for the RDMA/CM.

    Note: since srp_daemon and ibsrpdm rely on the subnet manager and
    since there is no equivalent of the IB subnet manager in non-IB
    networks, login has to be performed manually for non-IB networks.

    Signed-off-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Bart Van Assche
     

23 Jan, 2018

1 commit


11 Jan, 2018

1 commit

  • In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery
    competing with ata error handling") introduced disco mutex to prevent
    rediscovery competing with ata error handling and put the whole
    revalidation in the mutex. But the rphy add/remove needs to wait for the
    error handling which also grabs the disco mutex. This may leads to dead
    lock.So the probe and destruct event were introduce to do the rphy
    add/remove asynchronously and out of the lock.

    The asynchronously processed workers makes the whole discovery process
    not atomic, the other events may interrupt the process. For example,
    if a loss of signal event inserted before the probe event, the
    sas_deform_port() is called and the port will be deleted.

    And sas_port_delete() may run before the destruct event, but the
    port-x:x is the top parent of end device or expander. This leads to
    a kernel WARNING such as:

    [ 82.042979] sysfs group 'power' not found for kobject 'phy-1:0:22'
    [ 82.042983] ------------[ cut here ]------------
    [ 82.042986] WARNING: CPU: 54 PID: 1714 at fs/sysfs/group.c:237
    sysfs_remove_group+0x94/0xa0
    [ 82.043059] Call trace:
    [ 82.043082] [] sysfs_remove_group+0x94/0xa0
    [ 82.043085] [] dpm_sysfs_remove+0x60/0x70
    [ 82.043086] [] device_del+0x138/0x308
    [ 82.043089] [] sas_phy_delete+0x38/0x60
    [ 82.043091] [] do_sas_phy_delete+0x6c/0x80
    [ 82.043093] [] device_for_each_child+0x58/0xa0
    [ 82.043095] [] sas_remove_children+0x40/0x50
    [ 82.043100] [] sas_destruct_devices+0x64/0xa0
    [ 82.043102] [] process_one_work+0x1fc/0x4b0
    [ 82.043104] [] worker_thread+0x50/0x490
    [ 82.043105] [] kthread+0xfc/0x128
    [ 82.043107] [] ret_from_fork+0x10/0x50

    Make probe and destruct a direct call in the disco and revalidate function,
    but put them outside the lock. The whole discovery or revalidate won't
    be interrupted by other events. And the DISCE_PROBE and DISCE_DESTRUCT
    event are deleted as a result of the direct call.

    Introduce a new list to destruct the sas_port and put the port delete after
    the destruct. This makes sure the right order of destroying the sysfs
    kobject and fix the warning above.

    In sas_ex_revalidate_domain() have a loop to find all broadcasted
    device, and sometimes we have a chance to find the same expander twice.
    Because the sas_port will be deleted at the end of the whole revalidate
    process, sas_port with the same name cannot be added before this.
    Otherwise the sysfs will complain of creating duplicate filename. Since
    the LLDD will send broadcast for every device change, we can only
    process one expander's revalidation.

    [mkp: kbuild test robot warning]

    Signed-off-by: Jason Yan
    CC: John Garry
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    CC: Dan Williams
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Jason Yan
     

09 Jan, 2018

5 commits

  • The block layer now handles zone write locking.

    [mkp: removed SCMD_ZONE_WRITE_LOCK reference in scsi_debugfs]

    Signed-off-by: Damien Le Moal
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Martin K. Petersen
    Signed-off-by: Martin K. Petersen

    Damien Le Moal
     
  • Now all libsas works are queued to scsi host workqueue, include sas
    event work post by LLDD and sas discovery work, and a sas hotplug flow
    may be divided into several works, e.g libsas receive a
    PORTE_BYTES_DMAED event, currently we process it as following steps:

    sas_form_port --- run in work in shost workq
    sas_discover_domain --- run in another work in shost workq
    ...
    sas_probe_devices --- run in new work in shost workq
    We found during hot-add a device, libsas may need run several
    works in same workqueue to add device in system, the process is
    not atomic, it may interrupt by other sas event works, like
    PHYE_LOSS_OF_SIGNAL.

    This patch is preparation of execute libsas sas event in sync. We need
    to use different workqueue to run sas event and disco event. Otherwise
    the work will be blocked for waiting another chained work in the same
    workqueue.

    Signed-off-by: Yijing Wang
    CC: John Garry
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    CC: Dan Williams
    Signed-off-by: Jason Yan
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Jason Yan
     
  • Add a sysfs attr that LLDD can configure it for every host. We made an
    example in hisi_sas. Other LLDDs using libsas can implement it if they
    want.

    Suggested-by: Hannes Reinecke
    Signed-off-by: Jason Yan
    CC: John Garry
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    CC: Dan Williams
    Acked-by: John Garry #for hisi_sas part
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Jason Yan
     
  • If the PHY burst too many events, we will alloc a lot of events for the
    worker. This may leads to memory exhaustion.

    Dan Williams suggested to shut down the PHY if the events reached the
    threshold, because in this case the PHY may have gone into some
    erroneous state. Users can re-enable the PHY by sysfs if they want.

    We cannot use the fixed memory pool because if we run out of events, the
    shut down event and loss of signal event will lost too. The events still
    need to be allocated and processed in this case.

    Suggested-by: Dan Williams
    Signed-off-by: Jason Yan
    CC: John Garry
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Jason Yan
     
  • Now libsas hotplug work is static, every sas event type has its own
    static work, LLDD driver queues the hotplug work into shost->work_q. If
    LLDD driver burst posts lots hotplug events to libsas, the hotplug
    events may pending in the workqueue like

    shost->work_q
    new work[PORTE_BYTES_DMAED] --> |[PHYE_LOSS_OF_SIGNAL][PORTE_BYTES_DMAED] -> processing
    ||

    In this case, a new PORTE_BYTES_DMAED event coming, libsas try to queue
    it to shost->work_q, but this work is already pending, so it would be
    lost. Finally, libsas delete the related sas port and sas devices, but
    LLDD driver expect libsas add the sas port and devices(last sas event).

    This patch use dynamic allocated work to avoid this issue.

    Signed-off-by: Yijing Wang
    CC: John Garry
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    CC: Dan Williams
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Jason Yan
    Signed-off-by: Martin K. Petersen

    Jason Yan
     

04 Jan, 2018

1 commit


08 Dec, 2017

2 commits

  • Commit 651a01364994 ("scsi: scsi_transport_sas: switch to bsg-lib for
    SMP passthrough") removed the only call to scsi_initialize_rq() from
    outside the SCSI core. Hence unexport scsi_initialize_rq().

    Signed-off-by: Bart Van Assche
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • If scsi_eh_scmd_add() is called concurrently with
    scsi_host_queue_ready() while shost->host_blocked > 0 then it can
    happen that neither function wakes up the SCSI error handler. Fix
    this by making every function that decreases the host_busy counter
    wake up the error handler if necessary and by protecting the
    host_failed checks with the SCSI host lock.

    Reported-by: Pavel Tikhomirov
    References: https://marc.info/?l=linux-kernel&m=150461610630736
    Fixes: commit 746650160866 ("scsi: convert host_busy to atomic_t")
    Signed-off-by: Bart Van Assche
    Reviewed-by: Pavel Tikhomirov
    Tested-by: Stuart Hayes
    Cc: Konstantin Khorenko
    Cc: Stuart Hayes
    Cc: Pavel Tikhomirov
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Cc:
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

22 Nov, 2017

1 commit

  • The rps_resp buffer in ata_device is a DMA target, but it isn't
    explicitly cacheline aligned. Due to this, adjacent fields can be
    overwritten with stale data from memory on non-coherent architectures.
    As a result, the kernel is sometimes unable to communicate with an SATA
    device behind a SAS expander.

    Fix this by ensuring that the rps_resp buffer is cacheline aligned.

    This issue is similar to that fixed by Commit 84bda12af31f93 ("libata:
    align ap->sector_buf") and Commit 4ee34ea3a12396f35b26 ("libata: Align
    ata_device's id on a cacheline").

    Cc: stable@vger.kernel.org
    Signed-off-by: Huacai Chen
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Huacai Chen
     

17 Nov, 2017

1 commit


15 Nov, 2017

2 commits

  • Pull SCSI updates from James Bottomley:
    "This is mostly updates of the usual suspects: lpfc, qla2xxx, hisi_sas,
    megaraid_sas, pm80xx, mpt3sas, be2iscsi, hpsa. and a host of minor
    updates.

    There's no major behaviour change or additions to the core in all of
    this, so the potential for regressions should be small (biggest
    potential being in the scsi error handler changes)"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (203 commits)
    scsi: lpfc: Fix hard lock up NMI in els timeout handling.
    scsi: mpt3sas: remove a stray KERN_INFO
    scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event()
    scsi: aacraid: use timespec64 instead of timeval
    scsi: scsi_transport_fc: add 64GBIT and 128GBIT port speed definitions
    scsi: qla2xxx: Suppress a kernel complaint in qla_init_base_qpair()
    scsi: mpt3sas: fix dma_addr_t casts
    scsi: be2iscsi: Use kasprintf
    scsi: storvsc: Avoid excessive host scan on controller change
    scsi: lpfc: fix kzalloc-simple.cocci warnings
    scsi: mpt3sas: Update mpt3sas driver version.
    scsi: mpt3sas: Fix sparse warnings
    scsi: mpt3sas: Fix nvme drives checking for tlr.
    scsi: mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info
    scsi: mpt3sas: Add-Task-management-debug-info-for-NVMe-drives.
    scsi: mpt3sas: scan and add nvme device after controller reset
    scsi: mpt3sas: Set NVMe device queue depth as 128
    scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware.
    scsi: mpt3sas: API's to remove nvme drive from sml
    scsi: mpt3sas: API 's to support NVMe drive addition to SML
    ...

    Linus Torvalds
     
  • Pull core block layer updates from Jens Axboe:
    "This is the main pull request for block storage for 4.15-rc1.

    Nothing out of the ordinary in here, and no API changes or anything
    like that. Just various new features for drivers, core changes, etc.
    In particular, this pull request contains:

    - A patch series from Bart, closing the whole on blk/scsi-mq queue
    quescing.

    - A series from Christoph, building towards hidden gendisks (for
    multipath) and ability to move bio chains around.

    - NVMe
    - Support for native multipath for NVMe (Christoph).
    - Userspace notifications for AENs (Keith).
    - Command side-effects support (Keith).
    - SGL support (Chaitanya Kulkarni)
    - FC fixes and improvements (James Smart)
    - Lots of fixes and tweaks (Various)

    - bcache
    - New maintainer (Michael Lyle)
    - Writeback control improvements (Michael)
    - Various fixes (Coly, Elena, Eric, Liang, et al)

    - lightnvm updates, mostly centered around the pblk interface
    (Javier, Hans, and Rakesh).

    - Removal of unused bio/bvec kmap atomic interfaces (me, Christoph)

    - Writeback series that fix the much discussed hundreds of millions
    of sync-all units. This goes all the way, as discussed previously
    (me).

    - Fix for missing wakeup on writeback timer adjustments (Yafang
    Shao).

    - Fix laptop mode on blk-mq (me).

    - {mq,name} tupple lookup for IO schedulers, allowing us to have
    alias names. This means you can use 'deadline' on both !mq and on
    mq (where it's called mq-deadline). (me).

    - blktrace race fix, oopsing on sg load (me).

    - blk-mq optimizations (me).

    - Obscure waitqueue race fix for kyber (Omar).

    - NBD fixes (Josef).

    - Disable writeback throttling by default on bfq, like we do on cfq
    (Luca Miccio).

    - Series from Ming that enable us to treat flush requests on blk-mq
    like any other request. This is a really nice cleanup.

    - Series from Ming that improves merging on blk-mq with schedulers,
    getting us closer to flipping the switch on scsi-mq again.

    - BFQ updates (Paolo).

    - blk-mq atomic flags memory ordering fixes (Peter Z).

    - Loop cgroup support (Shaohua).

    - Lots of minor fixes from lots of different folks, both for core and
    driver code"

    * 'for-4.15/block' of git://git.kernel.dk/linux-block: (294 commits)
    nvme: fix visibility of "uuid" ns attribute
    blk-mq: fixup some comment typos and lengths
    ide: ide-atapi: fix compile error with defining macro DEBUG
    blk-mq: improve tag waiting setup for non-shared tags
    brd: remove unused brd_mutex
    blk-mq: only run the hardware queue if IO is pending
    block: avoid null pointer dereference on null disk
    fs: guard_bio_eod() needs to consider partitions
    xtensa/simdisk: fix compile error
    nvme: expose subsys attribute to sysfs
    nvme: create 'slaves' and 'holders' entries for hidden controllers
    block: create 'slaves' and 'holders' entries for hidden gendisks
    nvme: also expose the namespace identification sysfs files for mpath nodes
    nvme: implement multipath access to nvme subsystems
    nvme: track shared namespaces
    nvme: introduce a nvme_ns_ids structure
    nvme: track subsystems
    block, nvme: Introduce blk_mq_req_flags_t
    block, scsi: Make SCSI quiesce and resume work reliably
    block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag
    ...

    Linus Torvalds
     

14 Nov, 2017

1 commit

  • Pull timer updates from Thomas Gleixner:
    "Yet another big pile of changes:

    - More year 2038 work from Arnd slowly reaching the point where we
    need to think about the syscalls themself.

    - A new timer function which allows to conditionally (re)arm a timer
    only when it's either not running or the new expiry time is sooner
    than the armed expiry time. This allows to use a single timer for
    multiple timeout requirements w/o caring about the first expiry
    time at the call site.

    - A new NMI safe accessor to clock real time for the printk timestamp
    work. Can be used by tracing, perf as well if required.

    - A large number of timer setup conversions from Kees which got
    collected here because either maintainers requested so or they
    simply got ignored. As Kees pointed out already there are a few
    trivial merge conflicts and some redundant commits which was
    unavoidable due to the size of this conversion effort.

    - Avoid a redundant iteration in the timer wheel softirq processing.

    - Provide a mechanism to treat RTC implementations depending on their
    hardware properties, i.e. don't inflict the write at the 0.5
    seconds boundary which originates from the PC CMOS RTC to all RTCs.
    No functional change as drivers need to be updated separately.

    - The usual small updates to core code clocksource drivers. Nothing
    really exciting"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (111 commits)
    timers: Add a function to start/reduce a timer
    pstore: Use ktime_get_real_fast_ns() instead of __getnstimeofday()
    timer: Prepare to change all DEFINE_TIMER() callbacks
    netfilter: ipvs: Convert timers to use timer_setup()
    scsi: qla2xxx: Convert timers to use timer_setup()
    block/aoe: discover_timer: Convert timers to use timer_setup()
    ide: Convert timers to use timer_setup()
    drbd: Convert timers to use timer_setup()
    mailbox: Convert timers to use timer_setup()
    crypto: Convert timers to use timer_setup()
    drivers/pcmcia: omap1: Fix error in automated timer conversion
    ARM: footbridge: Fix typo in timer conversion
    drivers/sgi-xp: Convert timers to use timer_setup()
    drivers/pcmcia: Convert timers to use timer_setup()
    drivers/memstick: Convert timers to use timer_setup()
    drivers/macintosh: Convert timers to use timer_setup()
    hwrng/xgene-rng: Convert timers to use timer_setup()
    auxdisplay: Convert timers to use timer_setup()
    sparc/led: Convert timers to use timer_setup()
    mips: ip22/32: Convert timers to use timer_setup()
    ...

    Linus Torvalds
     

11 Nov, 2017

1 commit

  • The contexts from which a SCSI device can be quiesced or resumed are:
    * Writing into /sys/class/scsi_device/*/device/state.
    * SCSI parallel (SPI) domain validation.
    * The SCSI device power management methods. See also scsi_bus_pm_ops.

    It is essential during suspend and resume that neither the filesystem
    state nor the filesystem metadata in RAM changes. This is why while
    the hibernation image is being written or restored that SCSI devices
    are quiesced. The SCSI core quiesces devices through scsi_device_quiesce()
    and scsi_device_resume(). In the SDEV_QUIESCE state execution of
    non-preempt requests is deferred. This is realized by returning
    BLKPREP_DEFER from inside scsi_prep_state_check() for quiesced SCSI
    devices. Avoid that a full queue prevents power management requests
    to be submitted by deferring allocation of non-preempt requests for
    devices in the quiesced state. This patch has been tested by running
    the following commands and by verifying that after each resume the
    fio job was still running:

    for ((i=0; i sync_action
    sleep 1
    done
    ) &
    pids=($!)
    for d in /sys/class/block/sd*[a-z]; do
    bdev=${d#/sys/class/block/}
    hcil=$(readlink "$d/device")
    hcil=${hcil#../../../}
    echo 4 > "$d/queue/nr_requests"
    echo 1 > "/sys/class/scsi_device/$hcil/device/queue_depth"
    fio --name="$bdev" --filename="/dev/$bdev" --buffered=0 --bs=512 \
    --rw=randread --ioengine=libaio --numjobs=4 --iodepth=16 \
    --iodepth_batch=1 --thread --loops=$((2**31)) &
    pids+=($!)
    done
    sleep 1
    echo "$(date) Hibernating ..." >>hibernate-test-log.txt
    systemctl hibernate
    sleep 10
    kill "${pids[@]}"
    echo idle > /sys/block/md0/md/sync_action
    wait
    echo "$(date) Done." >>hibernate-test-log.txt
    done

    Reported-by: Oleksandr Natalenko
    References: "I/O hangs after resuming from suspend-to-ram" (https://marc.info/?l=linux-block&m=150340235201348).
    Signed-off-by: Bart Van Assche
    Reviewed-by: Hannes Reinecke
    Tested-by: Martin Steigerwald
    Tested-by: Oleksandr Natalenko
    Cc: Martin K. Petersen
    Cc: Ming Lei
    Cc: Christoph Hellwig
    Cc: Johannes Thumshirn
    Signed-off-by: Jens Axboe

    Bart Van Assche
     

09 Nov, 2017

1 commit


02 Nov, 2017

2 commits

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • In preparation for unconditionally passing the struct timer_list pointer to
    all timer callbacks, switch to using the new timer_setup() and from_timer()
    to pass the timer pointer explicitly. This requires adding a pointer to
    hold the timer's target task, as there isn't a link back from slow_task.

    Cc: John Garry
    Cc: "James E.J. Bottomley"
    Cc: "Martin K. Petersen"
    Cc: Jack Wang
    Cc: lindar_liu@usish.com
    Cc: Jens Axboe
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Cc: Benjamin Block
    Cc: Baoyou Xie
    Cc: Wei Yongjun
    Cc: linux-scsi@vger.kernel.org
    Signed-off-by: Kees Cook
    Reviewed-by: Martin K. Petersen
    Acked-by: John Garry # for hisi_sas part
    Tested-by: John Garry # basic sanity test for hisi_sas
    Reviewed-by: Jack Wang

    Kees Cook
     

27 Oct, 2017

1 commit

  • In preparation for unconditionally passing the struct timer_list pointer to
    all timer callbacks, switch to using the new timer_setup() and from_timer()
    to pass the timer pointer explicitly.

    Cc: QLogic-Storage-Upstream@qlogic.com
    Cc: "James E.J. Bottomley"
    Cc: "Martin K. Petersen"
    Cc: Johannes Thumshirn
    Cc: linux-scsi@vger.kernel.org
    Cc: fcoe-devel@open-fcoe.org
    Signed-off-by: Kees Cook
    Acked-by: Johannes Thumshirn

    Kees Cook
     

19 Oct, 2017

1 commit

  • As per SAM there is a status precedence, with any sense code 29/XX
    taking second place just after an ACA ACTIVE status. Additionally, each
    target might prefer to not queue any unit attention conditions, but just
    report one. Due to the above, this will be that one with the highest
    precedence. This results in the sense code 29/XX effectively
    overwriting any other unit attention. Hence we should report the
    power-on reset to userland so that it can take appropriate action.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     

17 Oct, 2017

2 commits

  • Reformat blacklist flags to make the values easier to read and to
    enhance error checking.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Bart van Assche
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • Move standard macro definitions for the zone types and zone conditions
    to scsi_proto.h together with the definitions related to the REPORT
    ZONES command. While at it, define all values in the enums to be clear.

    Also remove unnecessary includes in sd_zbc.c.

    No functional change is introduced by this patch.

    Signed-off-by: Damien Le Moal
    Reviewed-by: Bart Van Assche
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Damien Le Moal
     

03 Oct, 2017

2 commits

  • iscsi_session_teardown was the only user of this function. Function
    currently is just short for iscsi_remove_session + iscsi_free_session.

    Signed-off-by: Khazhismel Kumykov
    Acked-by: Chris Leech
    Signed-off-by: Martin K. Petersen

    Khazhismel Kumykov
     
  • SBC-4 states:

    "A MAXIMUM UNMAP LBA COUNT field set to a non-zero value indicates the
    maximum number of LBAs that may be unmapped by an UNMAP command"

    "A MAXIMUM WRITE SAME LENGTH field set to a non-zero value indicates
    the maximum number of contiguous logical blocks that the device server
    allows to be unmapped or written in a single WRITE SAME command."

    Despite the spec being clear on the topic, some devices incorrectly
    expect WRITE SAME commands with the UNMAP bit set to be limited to the
    value reported in MAXIMUM UNMAP LBA COUNT in the Block Limits VPD.

    Implement a blacklist option that can be used to accommodate devices
    with this behavior.

    Cc:
    Reported-by: Bill Kuzeja
    Reported-by: Ewan D. Milne
    Reviewed-by: Ewan D. Milne
    Tested-by: Laurence Oberman
    Signed-off-by: Martin K. Petersen

    Martin K. Petersen
     

16 Sep, 2017

3 commits

  • No one uses the port_gone_completion in struct asd_sas_port and
    DISCE_PORT_GONE in enum disover_event, clean them out.

    Signed-off-by: Jason Yan
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    CC: Dan Williams
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Jason Yan
     
  • Numbering for each event enum makes no sense. Remove the numbering so
    that we don't have to calculate the number by hand every time.

    Signed-off-by: Jason Yan
    CC: John Garry
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Jason Yan
     
  • The ha_event now has only one event HAE_RESET, and this event does
    nothing. Kill it and do some cleanup.

    This is a preparation for enhance libsas hotplug feature in the next
    patches.

    Signed-off-by: Jason Yan
    Signed-off-by: John Garry
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Christoph Hellwig
    CC: Johannes Thumshirn
    CC: Ewan Milne
    CC: Christoph Hellwig
    CC: Tomas Henzl
    CC: Dan Williams
    Signed-off-by: Martin K. Petersen

    Jason Yan
     

14 Sep, 2017

1 commit


08 Sep, 2017

1 commit


05 Sep, 2017

1 commit

  • A patch I wrote myself several years ago removed SCSI target support
    from the code under drivers/scsi. That patch removed the code that sets
    uspace_req_q to a non-NULL value. Hence also remove the code that
    depends on uspace_req_q != NULL.

    References: commit 066465251303 ("tgt: removal")
    Signed-off-by: Bart Van Assche
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

01 Sep, 2017

1 commit

  • If a pass-through request is submitted then blk_get_request()
    initializes that request by calling scsi_initialize_rq(). Also call this
    function for filesystem requests. Introduce CMD_INITIALIZED to keep
    track of whether or not a request has already been initialized.

    Signed-off-by: Bart Van Assche
    Cc: Christoph Hellwig
    Cc: Brian King
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

30 Aug, 2017

2 commits

  • Simplify the SMP passthrough code by switching it to the generic bsg-lib
    helpers that abstract away the details of the request code, and gets
    drivers out of seeing struct scsi_request.

    For the libsas host SMP code there is a small behavior difference in
    that we now always clear the residual len for successful commands,
    similar to the three other SMP handler implementations. Given that
    there is no partial command handling in the host SMP handler this should
    not matter in practice.

    [mkp: typos and checkpatch fixes]

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Christoph Hellwig
     
  • Introduce struct scsi_vpd for the VPD page length, data and the RCU head
    that will be used to free the VPD data. Use kfree_rcu() instead of
    kfree() to free VPD data. Move the VPD buffer pointer check inside the
    RCU read lock in the sysfs code. Only annotate pointers that are shared
    across threads with __rcu. Use rcu_dereference() when dereferencing an
    RCU pointer. This patch suppresses about twenty sparse complaints about
    the vpd_pg8[03] pointers. This patch also fixes a race condition, namely
    that updating of the VPD pointers and length variables in struct
    scsi_device was not atomic with reference to the code reading these
    variables. See also "Does the update code tolerate concurrent accesses?"
    in Documentation/RCU/checklist.txt.

    Fixes: commit 09e2b0b14690 ("scsi: rescan VPD attributes")
    Signed-off-by: Bart Van Assche
    Acked-by: Hannes Reinecke
    Reviewed-by: Shane Seymour
    Cc: Christoph Hellwig
    Cc: Johannes Thumshirn
    Cc: Shane Seymour
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

26 Aug, 2017

1 commit