26 Aug, 2017

2 commits

  • Pull virtio fixes from Michael Tsirkin:
    "Fixes two obvious bugs in virtio pci"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio_pci: fix cpu affinity support
    virtio_blk: fix incorrect message when disk is resized

    Linus Torvalds
     
  • The message printed on disk resize is incorrect. The following is
    printed when resizing to 2 GiB:

    $ truncate -s 1G test.img
    $ qemu -device virtio-blk-pci,logical_block_size=4096,...
    (qemu) block_resize drive1 2G

    virtio_blk virtio0: new size: 4194304 4096-byte logical blocks (17.2 GB/16.0 GiB)

    The virtio_blk capacity config field is in 512-byte sector units
    regardless of logical_block_size as per the VIRTIO specification.
    Therefore the message should read:

    virtio_blk virtio0: new size: 524288 4096-byte logical blocks (2.15 GB/2.0 GiB)

    Note that this only affects the printed message. Thankfully the actual
    block device has the correct size because the block layer expects
    capacity in sectors.

    Signed-off-by: Stefan Hajnoczi
    Signed-off-by: Michael S. Tsirkin

    Stefan Hajnoczi
     

24 Aug, 2017

1 commit


16 Aug, 2017

1 commit


15 Aug, 2017

1 commit

  • Since commit d05d7f40791c ("Merge branch 'for-4.8/core' of
    git://git.kernel.dk/linux-block") and 3fc9d690936f ("Merge branch
    'for-4.8/drivers' of git://git.kernel.dk/linux-block"), blkfront_resume()
    has been using an index for iterating ring_info to check request when
    iterating blk_shadow in an inner loop. This seems to have been
    accidentally introduced during the massive rewrite of the block layer
    macros in the commits.

    This may cause crash like this:

    [11798.057074] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
    [11798.058832] IP: [] blkfront_resume+0x10a/0x610
    ....
    [11798.061063] Call Trace:
    [11798.061063] [] xenbus_dev_resume+0x53/0x140
    [11798.061063] [] ? xenbus_dev_probe+0x150/0x150
    [11798.061063] [] dpm_run_callback+0x3e/0x110
    [11798.061063] [] device_resume+0x88/0x190
    [11798.061063] [] dpm_resume+0x100/0x2d0
    [11798.061063] [] dpm_resume_end+0x11/0x20
    [11798.061063] [] do_suspend+0xe8/0x1a0
    [11798.061063] [] shutdown_handler+0xfd/0x130
    [11798.061063] [] ? split+0x110/0x110
    [11798.061063] [] xenwatch_thread+0x86/0x120
    [11798.061063] [] ? prepare_to_wait_event+0x110/0x110
    [11798.061063] [] kthread+0xd7/0xf0
    [11798.061063] [] ? kfree+0x121/0x170
    [11798.061063] [] ? kthread_park+0x60/0x60
    [11798.061063] [] ? call_usermodehelper_exec_work+0xb0/0xb0
    [11798.061063] [] ? call_usermodehelper_exec_async+0x13a/0x140
    [11798.061063] [] ret_from_fork+0x25/0x30

    Use the right index in the inner loop.

    Fixes: d05d7f40791c ("Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block")
    Fixes: 3fc9d690936f ("Merge branch 'for-4.8/drivers' of git://git.kernel.dk/linux-block")
    Signed-off-by: Munehisa Kamata
    Reviewed-by: Thomas Friebel
    Reviewed-by: Eduardo Valentin
    Reviewed-by: Boris Ostrovsky
    Cc: Juergen Gross
    Cc: Konrad Rzeszutek Wilk
    Reviewed-by: Roger Pau Monne
    Cc: xen-devel@lists.xenproject.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Konrad Rzeszutek Wilk

    Munehisa Kamata
     

11 Aug, 2017

1 commit

  • comp_algorithm_store() passes the size of the source buffer to strlcpy()
    instead of the destination buffer size. Make it explicit that the two
    buffers have the same size and use strcpy() instead of strlcpy(). The
    latter can be done safely since the function ensures that the string in
    the source buffer is terminated.

    Link: http://lkml.kernel.org/r/20170803163350.45245-1-mka@chromium.org
    Signed-off-by: Matthias Kaehlcke
    Reviewed-by: Douglas Anderson
    Reviewed-by: Sergey Senozhatsky
    Acked-by: Minchan Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthias Kaehlcke
     

10 Aug, 2017

1 commit

  • Using mpgroup to define multiple paths for a virtual disk causes multiple
    virtual-device-port ports to be created for that virtual device.
    Each virtual-device-port port then gets a vdisk created for it by the Linux
    sunvdc driver. As mpgroup is not supported by the Linux sunvdc driver it
    cannot handle multiple ports for a single vdisk, leading to a kernel panic
    at startup.

    This fix prevents more than one vdisk per virtual-device-port being created
    until full virtual disk multipathing (mpgroup) support is implemented.

    Signed-off-by: Jim Quigley
    Reviewed-by: Liam Merwick
    Reviewed-by: Shannon Nelson
    Reviewed-by: Alexandre Chartre
    Reviewed-by: Aaron Young
    Signed-off-by: David S. Miller

    Jim Quigley
     

29 Jul, 2017

1 commit

  • Pull block fixes from Jens Axboe:
    "A small collection of fixes that should go into this series. This
    contains:

    - NVMe pull request from Christoph, with various fixes for nvme
    proper and nvme-fc.

    - disable runtime PM for blk-mq for now.

    With scsi now defaulting to using blk-mq, this reared its head as
    an issue. Longer term we'll fix up runtime PM for blk-mq, for now
    just disable it to prevent a hang on laptop resume for some folks.

    - blk-mq CPU hw queue map fix from Christoph.

    - xen/blkfront pull request from Konrad, with two small fixes for the
    blkfront driver.

    - a few fixups for nbd from Joseph.

    - a stable fix for pblk from Javier"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    lightnvm: pblk: advance bio according to lba index
    nvme: validate admin queue before unquiesce
    nbd: clear disconnected on reconnect
    nvme-pci: fix HMB size calculation
    nvme-fc: revise TRADDR parsing
    nvme-fc: address target disconnect race conditions in fcp io submit
    nvme: fabrics commands should use the fctype field for data direction
    nvme: also provide a UUID in the WWID sysfs attribute
    xen/blkfront: always allocate grants first from per-queue persistent grants
    xen-blkfront: fix mq start/stop race
    blk-mq: map queues to all present CPUs
    block: disable runtime-pm for blk-mq
    xen-blkfront: Fix handling of non-supported operations
    nbd: only set sndtimeo if we have a timeout set
    nbd: take tx_lock before disconnecting
    nbd: allow multiple disconnects to be sent

    Linus Torvalds
     

26 Jul, 2017

2 commits

  • …/git/konrad/xen into for-linus

    Pull xen-blkfront fixes from Konrad for 4.13.

    Jens Axboe
     
  • If our device loses its connection for longer than the dead timeout we
    will set NBD_DISCONNECTED in order to quickly fail any pending IO's that
    flood in after the IO's that were waiting during the dead timer.
    However if we re-connect at some point in the future we'll still see
    this DISCONNECTED flag set if we then lose our connection again after
    that, which means we won't get notifications for our newly lost
    connections. Fix this by just clearing the DISCONNECTED flag on
    reconnect in order to make sure everything works as it's supposed to.

    Reported-by: Dan Melnic
    Signed-off-by: Josef Bacik
    Signed-off-by: Jens Axboe

    Josef Bacik
     

25 Jul, 2017

3 commits

  • This patch partially reverts 3df0e50 ("xen/blkfront: pseudo support for
    multi hardware queues/rings"). The xen-blkfront queue/ring might hang due
    to grants allocation failure in the situation when gnttab_free_head is
    almost empty while many persistent grants are reserved for this queue/ring.

    As persistent grants management was per-queue since 73716df ("xen/blkfront:
    make persistent grants pool per-queue"), we should always allocate from
    persistent grants first.

    Acked-by: Roger Pau Monné
    Signed-off-by: Dongli Zhang
    Signed-off-by: Konrad Rzeszutek Wilk

    Dongli Zhang
     
  • When ring buf full, hw queue will be stopped. While blkif interrupt consume
    request and make free space in ring buf, hw queue will be started again.
    But since start queue is protected by spin lock while stop not, that will
    cause a race.

    interrupt: process:
    blkif_interrupt() blkif_queue_rq()
    kick_pending_request_queues_locked()
    blk_mq_start_stopped_hw_queues()
    clear_bit(BLK_MQ_S_STOPPED, &hctx->state)
    blk_mq_stop_hw_queue(hctx)
    blk_mq_run_hw_queue(hctx, async)

    If ring buf is made empty in this case, interrupt will never come, then the
    hw queue will be stopped forever, all processes waiting for the pending io
    in the queue will hung.

    Signed-off-by: Junxiao Bi
    Reviewed-by: Ankur Arora
    Acked-by: Roger Pau Monné
    Signed-off-by: Konrad Rzeszutek Wilk

    Junxiao Bi
     
  • Use sysfs_match_string() helper instead of open coded variant.

    Cc: "Michael S. Tsirkin"
    Cc: Jason Wang
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Jason Wang

    Andy Shevchenko
     

24 Jul, 2017

1 commit

  • This patch fixes the following sparse warnings:

    drivers/block/xen-blkfront.c:916:45: warning: incorrect type in argument 2 (different base types)
    drivers/block/xen-blkfront.c:916:45: expected restricted blk_status_t [usertype] error
    drivers/block/xen-blkfront.c:916:45: got int [signed] error
    drivers/block/xen-blkfront.c:1599:47: warning: incorrect type in assignment (different base types)
    drivers/block/xen-blkfront.c:1599:47: expected int [signed] error
    drivers/block/xen-blkfront.c:1599:47: got restricted blk_status_t [usertype]
    drivers/block/xen-blkfront.c:1607:55: warning: incorrect type in assignment (different base types)
    drivers/block/xen-blkfront.c:1607:55: expected int [signed] error
    drivers/block/xen-blkfront.c:1607:55: got restricted blk_status_t [usertype]
    drivers/block/xen-blkfront.c:1625:55: warning: incorrect type in assignment (different base types)
    drivers/block/xen-blkfront.c:1625:55: expected int [signed] error
    drivers/block/xen-blkfront.c:1625:55: got restricted blk_status_t [usertype]
    drivers/block/xen-blkfront.c:1628:62: warning: restricted blk_status_t degrades to integer

    Compile-tested only.

    Fixes: commit 2a842acab109 ("block: introduce new block status code type")
    Signed-off-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Cc: Konrad Rzeszutek Wilk
    Cc: Roger Pau Monné
    Cc:
    Signed-off-by: Jens Axboe

    Bart Van Assche
     

23 Jul, 2017

3 commits

  • A user reported that he was getting immediate disconnects with my
    sndtimeo patch applied. This is because by default the OSS nbd client
    doesn't set a timeout, so we end up setting the sndtimeo to 0, which of
    course means we have send errors a lot. Instead only set our sndtimeo
    if the user specified a timeout, otherwise we'll just wait forever like
    we did previously.

    Fixes: dc88e34d69d8 ("nbd: set sk->sk_sndtimeo for our sockets")
    Reported-by: Adam Borowski
    Signed-off-by: Josef Bacik
    Signed-off-by: Jens Axboe

    Josef Bacik
     
  • We need to take the tx_lock so we don't interleave our disconnect
    request between real data going down the wire.

    Signed-off-by: Josef Bacik
    Signed-off-by: Jens Axboe

    Josef Bacik
     
  • There's no reason to limit ourselves to one disconnect message per
    socket. Sometimes networks do strange things, might as well let
    sysadmins hit the panic button as much as they want.

    Signed-off-by: Josef Bacik
    Signed-off-by: Jens Axboe

    Josef Bacik
     

13 Jul, 2017

1 commit


12 Jul, 2017

1 commit

  • Pull more block updates from Jens Axboe:
    "This is a followup for block changes, that didn't make the initial
    pull request. It's a bit of a mixed bag, this contains:

    - A followup pull request from Sagi for NVMe. Outside of fixups for
    NVMe, it also includes a series for ensuring that we properly
    quiesce hardware queues when browsing live tags.

    - Set of integrity fixes from Dmitry (mostly), fixing various issues
    for folks using DIF/DIX.

    - Fix for a bug introduced in cciss, with the req init changes. From
    Christoph.

    - Fix for a bug in BFQ, from Paolo.

    - Two followup fixes for lightnvm/pblk from Javier.

    - Depth fix from Ming for blk-mq-sched.

    - Also from Ming, performance fix for mtip32xx that was introduced
    with the dynamic initialization of commands"

    * 'for-linus' of git://git.kernel.dk/linux-block: (44 commits)
    block: call bio_uninit in bio_endio
    nvmet: avoid unneeded assignment of submit_bio return value
    nvme-pci: add module parameter for io queue depth
    nvme-pci: compile warnings in nvme_alloc_host_mem()
    nvmet_fc: Accept variable pad lengths on Create Association LS
    nvme_fc/nvmet_fc: revise Create Association descriptor length
    lightnvm: pblk: remove unnecessary checks
    lightnvm: pblk: control I/O flow also on tear down
    cciss: initialize struct scsi_req
    null_blk: fix error flow for shared tags during module_init
    block: Fix __blkdev_issue_zeroout loop
    nvme-rdma: unconditionally recycle the request mr
    nvme: split nvme_uninit_ctrl into stop and uninit
    virtio_blk: quiesce/unquiesce live IO when entering PM states
    mtip32xx: quiesce request queues to make sure no submissions are inflight
    nbd: quiesce request queues to make sure no submissions are inflight
    nvme: kick requeue list when requeueing a request instead of when starting the queues
    nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues
    nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues
    nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues
    ...

    Linus Torvalds
     

11 Jul, 2017

4 commits

  • The global variable 'rd_size' is declared as 'int' in source file
    arch/arm/kernel/atags_parse.c and as 'unsigned long' in
    drivers/block/brd.c. Fix this inconsistency.

    Additionally, remove the declarations of rd_image_start, rd_prompt and
    rd_doload from parse_tag_ramdisk() since these duplicate existing
    declarations in .

    Link: http://lkml.kernel.org/r/20170627065024.12347-1-bart.vanassche@wdc.com
    Signed-off-by: Bart Van Assche
    Acked-by: Russell King
    Cc: Jens Axboe
    Cc: Jan Kara
    Cc: Jason Yan
    Cc: Zhaohongjiang
    Cc: Miao Xie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bart Van Assche
     
  • attribute_groups are not supposed to change at runtime. All functions
    working with attribute_groups provided by work with
    const attribute_group. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    8293 841 4 9138 23b2 drivers/block/zram/zram_drv.o

    File size After adding 'const':
    text data bss dec hex filename
    8357 777 4 9138 23b2 drivers/block/zram/zram_drv.o

    Link: http://lkml.kernel.org/r/65680c1c4d85818f7094cbfa31c91bf28185ba1b.1499061182.git.arvind.yadav.cs@gmail.com
    Signed-off-by: Arvind Yadav
    Acked-by: Minchan Kim
    Cc: Sergey Senozhatsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arvind Yadav
     
  • Use __sysfs_match_string() helper instead of open coded variant.

    Link: http://lkml.kernel.org/r/20170609120835.22156-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Sergey Senozhatsky
    Acked-by: Minchan Kim
    Cc: Nitin Gupta
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • Pull followup NVMe (mostly) changes from Sagi:

    I added the quiesce/unquiesce patches in here as it's
    easy for me easily apply changes on top. It has accumulated
    reviews and includes mostly nvme anyway, please tell me if
    you don't want to take them with this.

    This includes:
    - quiesce/unquiesce fixes in nvme and others from me
    - nvme-fc add create association padding spec updates from James
    - some more quirking from MKP
    - nvmet nit cleanup from Max
    - Fix nvme-rdma racy RDMA completion signalling from Marta
    - some centralization patches from me
    - add tagset nr_hw_queues updates on controller resets in
    nvme drivers from me
    - nvme-rdma fix resources recycling when doing error recovery from me
    - minor cleanups in nvme-fc from me

    Jens Axboe
     

08 Jul, 2017

1 commit

  • Pull libnvdimm updates from Dan Williams:
    "libnvdimm updates for the latest ACPI and UEFI specifications. This
    pull request also includes new 'struct dax_operations' enabling to
    undo the abuse of copy_user_nocache() for copy operations to pmem.

    The dax work originally missed 4.12 to address concerns raised by Al.

    Summary:

    - Introduce the _flushcache() family of memory copy helpers and use
    them for persistent memory write operations on x86. The
    _flushcache() semantic indicates that the cache is either bypassed
    for the copy operation (movnt) or any lines dirtied by the copy
    operation are written back (clwb, clflushopt, or clflush).

    - Extend dax_operations with ->copy_from_iter() and ->flush()
    operations. These operations and other infrastructure updates allow
    all persistent memory specific dax functionality to be pushed into
    libnvdimm and the pmem driver directly. It also allows dax-specific
    sysfs attributes to be linked to a host device, for example:
    /sys/block/pmem0/dax/write_cache

    - Add support for the new NVDIMM platform/firmware mechanisms
    introduced in ACPI 6.2 and UEFI 2.7. This support includes the v1.2
    namespace label format, extensions to the address-range-scrub
    command set, new error injection commands, and a new BTT
    (block-translation-table) layout. These updates support inter-OS
    and pre-OS compatibility.

    - Fix a longstanding memory corruption bug in nfit_test.

    - Make the pmem and nvdimm-region 'badblocks' sysfs files poll(2)
    capable.

    - Miscellaneous fixes and small updates across libnvdimm and the nfit
    driver.

    Acknowledgements that came after the branch was pushed: commit
    6aa734a2f38e ("libnvdimm, region, pmem: fix 'badblocks'
    sysfs_get_dirent() reference lifetime") was reviewed by Toshi Kani
    "

    * tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (42 commits)
    libnvdimm, namespace: record 'lbasize' for pmem namespaces
    acpi/nfit: Issue Start ARS to retrieve existing records
    libnvdimm: New ACPI 6.2 DSM functions
    acpi, nfit: Show bus_dsm_mask in sysfs
    libnvdimm, acpi, nfit: Add bus level dsm mask for pass thru.
    acpi, nfit: Enable DSM pass thru for root functions.
    libnvdimm: passthru functions clear to send
    libnvdimm, btt: convert some info messages to warn/err
    libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime
    libnvdimm: fix the clear-error check in nsio_rw_bytes
    libnvdimm, btt: fix btt_rw_page not returning errors
    acpi, nfit: quiet invalid block-aperture-region warnings
    libnvdimm, btt: BTT updates for UEFI 2.7 format
    acpi, nfit: constify *_attribute_group
    libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region
    libnvdimm, pmem, dax: export a cache control attribute
    dax: convert to bitmask for flags
    dax: remove default copy_from_iter fallback
    libnvdimm, nfit: enable support for volatile ranges
    libnvdimm, pmem: fix persistence warning
    ...

    Linus Torvalds
     

07 Jul, 2017

4 commits

  • Merge misc updates from Andrew Morton:

    - a few hotfixes

    - various misc updates

    - ocfs2 updates

    - most of MM

    * emailed patches from Andrew Morton : (108 commits)
    mm, memory_hotplug: move movable_node to the hotplug proper
    mm, memory_hotplug: drop CONFIG_MOVABLE_NODE
    mm, memory_hotplug: drop artificial restriction on online/offline
    mm: memcontrol: account slab stats per lruvec
    mm: memcontrol: per-lruvec stats infrastructure
    mm: memcontrol: use generic mod_memcg_page_state for kmem pages
    mm: memcontrol: use the node-native slab memory counters
    mm: vmstat: move slab statistics from zone to node counters
    mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare()
    mm/zswap.c: improve a size determination in zswap_frontswap_init()
    mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create()
    mm/swapfile.c: sort swap entries before free
    mm/oom_kill: count global and memory cgroup oom kills
    mm: per-cgroup memory reclaim stats
    mm: kmemleak: treat vm_struct as alternative reference to vmalloc'ed objects
    mm: kmemleak: factor object reference updating out of scan_block()
    mm: kmemleak: slightly reduce the size of some structures on 64-bit architectures
    mm, mempolicy: don't check cpuset seqlock where it doesn't matter
    mm, cpuset: always use seqlock when changing task's nodemask
    mm, mempolicy: simplify rebinding mempolicies when updating cpusets
    ...

    Linus Torvalds
     
  • Pull misc compat stuff updates from Al Viro:
    "This part is basically untangling various compat stuff. Compat
    syscalls moved to their native counterparts, getting rid of quite a
    bit of double-copying and/or set_fs() uses. A lot of field-by-field
    copyin/copyout killed off.

    - kernel/compat.c is much closer to containing just the
    copyin/copyout of compat structs. Not all compat syscalls are gone
    from it yet, but it's getting there.

    - ipc/compat_mq.c killed off completely.

    - block/compat_ioctl.c cleaned up; floppy compat ioctls moved to
    drivers/block/floppy.c where they belong. Yes, there are several
    drivers that implement some of the same ioctls. Some are m68k and
    one is 32bit-only pmac. drivers/block/floppy.c is the only one in
    that bunch that can be built on biarch"

    * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    mqueue: move compat syscalls to native ones
    usbdevfs: get rid of field-by-field copyin
    compat_hdio_ioctl: get rid of set_fs()
    take floppy compat ioctls to sodding floppy.c
    ipmi: get rid of field-by-field __get_user()
    ipmi: get COMPAT_IPMICTL_RECEIVE_MSG in sync with the native one
    rt_sigtimedwait(): move compat to native
    select: switch compat_{get,put}_fd_set() to compat_{get,put}_bitmap()
    put_compat_rusage(): switch to copy_to_user()
    sigpending(): move compat to native
    getrlimit()/setrlimit(): move compat to native
    times(2): move compat to native
    compat_{get,put}_bitmap(): use unsafe_{get,put}_user()
    fb_get_fscreeninfo(): don't bother with do_fb_ioctl()
    do_sigaltstack(): lift copying to/from userland into callers
    take compat_sys_old_getrlimit() to native syscall
    trim __ARCH_WANT_SYS_OLD_GETRLIMIT

    Linus Torvalds
     
  • Regardless of whether it is same page or not, it's surely write and
    stored to zram so we should increase pages_stored stat. Otherwise, user
    can see zero value via mm_stats although he writes a lot of pages to
    zram.

    Link: http://lkml.kernel.org/r/1494834068-27004-1-git-send-email-minchan@kernel.org
    Signed-off-by: Minchan Kim
    Reviewed-by: Sergey Senozhatsky
    Cc: Joonsoo Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Minchan Kim
     
  • The changes in "block: Make most scsi_req_init() calls implicit" mean
    that every driver that supports the generic scsi ioctls needs to
    call scsi_req_init on newly allocated requests, but that commit didn't
    add the call to the ccіss driver. Fix that to avoid crashes when
    udev issues SG_IO commands.

    Fixes: ca18d6f7 ("block: Make most scsi_req_init() calls implicit")
    Signed-off-by: Christoph Hellwig
    Reported-by: Meelis Roos
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

06 Jul, 2017

7 commits

  • In case we use shared tags feature, blk_mq_alloc_tag_set might fail
    during module initialization. In that case, fail the load with a
    suitable error code. Also move the tagset initialization process after
    defining the amount of submission queues.

    Signed-off-by: Max Gurtovoy
    Signed-off-by: Jens Axboe

    Max Gurtovoy
     
  • Without it its not guaranteed that no .queue_rq is inflight.

    Reviewed-by: Ming Lei
    Acked-by: Michael S. Tsirkin
    Cc: virtio-dev@lists.oasis-open.org
    Cc: Jason Wang
    Signed-off-by: Sagi Grimberg

    Sagi Grimberg
     
  • Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the
    submission path rcu grace. quiesce the queue before iterating
    on live tags, or performing device io quiescing.

    While were at it, verify that the request started in mtip_abort_cmd
    amd mtip_queue_cmd tag iteration calls.

    Reviewed-by: Ming Lei
    Signed-off-by: Sagi Grimberg

    Sagi Grimberg
     
  • Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the
    submission path rcu grace. quiesce the queue before iterating
    on live tags.

    Reviewed-by: Ming Lei
    Acked-by: Josef Bacik
    Signed-off-by: Sagi Grimberg

    Sagi Grimberg
     
  • Pull read/write updates from Al Viro:
    "Christoph's fs/read_write.c series - consolidation and cleanups"

    * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    nfsd: remove nfsd_vfs_read
    nfsd: use vfs_iter_read/write
    fs: implement vfs_iter_write using do_iter_write
    fs: implement vfs_iter_read using do_iter_read
    fs: move more code into do_iter_read/do_iter_write
    fs: remove __do_readv_writev
    fs: remove do_compat_readv_writev
    fs: remove do_readv_writev

    Linus Torvalds
     
  • Pull misc user access cleanups from Al Viro:
    "The first pile is assorted getting rid of cargo-culted access_ok(),
    cargo-culted set_fs() and field-by-field copyouts.

    The same description applies to a lot of stuff in other branches -
    this is just the stuff that didn't fit into a more specific topical
    branch"

    * 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    Switch flock copyin/copyout primitives to copy_{from,to}_user()
    fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found
    fs/fcntl: f_setown, avoid undefined behaviour
    fs/fcntl: f_setown, allow returning error
    lpfc debugfs: get rid of pointless access_ok()
    adb: get rid of pointless access_ok()
    isdn: get rid of pointless access_ok()
    compat statfs: switch to copy_to_user()
    fs/locks: don't mess with the address limit in compat_fcntl64
    nfsd_readlink(): switch to vfs_get_link()
    drbd: ->sendpage() never needed set_fs()
    fs/locks: pass kernel struct flock to fcntl_getlk/setlk
    fs: locks: Fix some troubles at kernel-doc comments

    Linus Torvalds
     
  • It is observed reading the register from HW takes a bit long,
    for example in my box, the following difference of 'perf report
    --no-children fio ...' can be seen when running I/O:

    1) V4.12 without patch
    + 9.28% fio [mtip32xx] [k] mtip_irq_handler
    + 8.48% fio [mtip32xx] [k] mtip_init_cmd_header

    2) V4.12 with the following patch
    + 9.14% fio [mtip32xx] [k] mtip_irq_handler
    ......
    + 1.14% fio [mtip32xx] [k] mtip_init_cmd_header

    IOPS can be increased by ~5% with this patch too.

    Fixes: a4e84aae8139(mtip32xx: use runtime tag to initialize command header)
    Signed-off-by: Ming Lei
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Ming Lei
     

04 Jul, 2017

1 commit

  • Pull driver core updates from Greg KH:
    "Here is the big driver core update for 4.13-rc1.

    The large majority of this is a lot of cleanup of old fields in the
    driver core structures and their remaining usages in random drivers.
    All of those fixes have been reviewed by the various subsystem
    maintainers. There's also some small firmware updates in here, a new
    kobject uevent api interface that makes userspace interaction easier,
    and a few other minor things.

    All of these have been in linux-next for a long while with no reported
    issues"

    * tag 'driver-core-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (56 commits)
    arm: mach-rpc: ecard: fix build error
    zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()
    driver-core: remove struct bus_type.dev_attrs
    powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type
    powerpc: vio: use dev_groups and not dev_attrs for bus_type
    USB: usbip: convert to use DRIVER_ATTR_RW
    s390: drivers: convert to use DRIVER_ATTR_RO/WO
    platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW
    pcmcia: ds: convert to use DRIVER_ATTR_RO
    wireless: ipw2x00: convert to use DRIVER_ATTR_RW
    net: ehea: convert to use DRIVER_ATTR_RO
    net: caif: convert to use DRIVER_ATTR_RO
    TTY: hvc: convert to use DRIVER_ATTR_RW
    PCI: pci-driver: convert to use DRIVER_ATTR_WO
    IB: nes: convert to use DRIVER_ATTR_RW
    HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups
    arm: ecard: fix dev_groups patch typo
    tty: serdev: use dev_groups and not dev_attrs for bus_type
    sparc: vio: use dev_groups and not dev_attrs for bus_type
    hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type
    ...

    Linus Torvalds
     

30 Jun, 2017

3 commits


28 Jun, 2017

1 commit

  • Drop static on a local variable, when the variable is initialized before
    any use, on every possible execution path through the function. The
    static has no benefit, and dropping it reduces the code size.

    The semantic patch that fixes this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @bad exists@
    position p;
    identifier x;
    type T;
    @@

    static T x@p;
    ...
    x =

    @@
    identifier x;
    expression e;
    type T;
    position p != bad.p;
    @@

    -static
    T x@p;
    ... when != x
    when strict
    ?x = e;
    //

    The change in code size is indicates by the following output from the size
    command.

    before:
    text data bss dec hex filename
    67299 2291 1056 70646 113f6 drivers/block/drbd/drbd_nl.o

    after:
    text data bss dec hex filename
    67283 2291 1056 70630 113e6 drivers/block/drbd/drbd_nl.o

    Signed-off-by: Julia Lawall
    Signed-off-by: Roland Kammerer
    Signed-off-by: Jens Axboe

    Julia Lawall