1. 31 5月, 2018 4 次提交
    • K
      nbd: clear DISCONNECT_REQUESTED flag once disconnection occurs. · 5e3c3a7e
      Kevin Vigor 提交于
      When a userspace client requests a NBD device be disconnected, the
      DISCONNECT_REQUESTED flag is set. While this flag is set, the driver
      will not inform userspace when a connection is closed.
      
      Unfortunately the flag was never cleared, so once a disconnect was
      requested the driver would thereafter never tell userspace about a
      closed connection. Thus when connections failed due to timeout, no
      attempt to reconnect was made and eventually the device would fail.
      
      Fix by clearing the DISCONNECT_REQUESTED flag (and setting the
      DISCONNECTED flag) once all connections are closed.
      Reviewed-by: NJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: NKevin Vigor <kvigor@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5e3c3a7e
    • L
      blk-throttle: fix potential NULL pointer dereference in throtl_select_dispatch · 2ab74cd2
      Liu Bo 提交于
      tg in throtl_select_dispatch is used first and then do check. Since tg
      may be NULL, it has potential NULL pointer dereference risk. So fix
      it.
      Signed-off-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
      Signed-off-by: NLiu Bo <bo.liu@linux.alibaba.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      2ab74cd2
    • J
      block: kyber: make kyber more friendly with merging · a6088845
      Jianchao Wang 提交于
      Currently, kyber is very unfriendly with merging. kyber depends
      on ctx rq_list to do merging, however, most of time, it will not
      leave any requests in ctx rq_list. This is because even if tokens
      of one domain is used up, kyber will try to dispatch requests
      from other domain and flush the rq_list there.
      
      To improve this, we setup kyber_ctx_queue (kcq) which is similar
      with ctx, but it has rq_lists for different domain and build same
      mapping between kcq and khd as the ctx & hctx. Then we could merge,
      insert and dispatch for different domains separately. At the same
      time, only flush the rq_list of kcq when get domain token successfully.
      Then if one domain token is used up, the requests could be left in
      the rq_list of that domain and maybe merged with following io.
      
      Following is my test result on machine with 8 cores and NVMe card
      INTEL SSDPEKKR128G7
      
      fio size=256m ioengine=libaio iodepth=64 direct=1 numjobs=8
      seq/random
      +------+---------------------------------------------------------------+
      |patch?| bw(MB/s) |   iops    | slat(usec) |    clat(usec)   |  merge  |
      +----------------------------------------------------------------------+
      | w/o  |  606/612 | 151k/153k |  6.89/7.03 | 3349.21/3305.40 |   0/0   |
      +----------------------------------------------------------------------+
      | w/   | 1083/616 | 277k/154k |  4.93/6.95 | 1830.62/3279.95 | 223k/3k |
      +----------------------------------------------------------------------+
      When set numjobs to 16, the bw and iops could reach 1662MB/s and 425k
      on my platform.
      Signed-off-by: NJianchao Wang <jianchao.w.wang@oracle.com>
      Tested-by: NHolger Hoffstätte <holger@applied-asynchrony.com>
      Reviewed-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      a6088845
    • J
      blk-mq: abstract out blk-mq-sched rq list iteration bio merge helper · 9c558734
      Jens Axboe 提交于
      No functional changes in this patch, just a prep patch for utilizing
      this in an IO scheduler.
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      Reviewed-by: NOmar Sandoval <osandov@fb.com>
      9c558734
  2. 30 5月, 2018 2 次提交
    • C
      block: remove parent device reference from struct bsg_class_device · 5de815a7
      Christoph Hellwig 提交于
      Bsg holding a reference to the parent device may result in a crash if a
      bsg file handle is closed after the parent device driver has unloaded.
      
      Holding a reference is not really needed: the parent device must exist
      between bsg_register_queue and bsg_unregister_queue.  Before the device
      goes away the caller does blk_cleanup_queue so that all in-flight
      requests to the device are gone and all new requests cannot pass beyond
      the queue.  The queue itself is a refcounted object and it will stay
      alive with a bsg file.
      
      Based on analysis, previous patch and changelog from Anatoliy Glagolev.
      Reported-by: NAnatoliy Glagolev <glagolig@gmail.com>
      Reviewed-by: NJames E.J. Bottomley <jejb@linux.vnet.ibm.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5de815a7
    • J
      Merge branch 'nvme-4.18-2' of git://git.infradead.org/nvme into for-4.18/block · b7405176
      Jens Axboe 提交于
      Pull NVMe changes from Christoph:
      
      "Here is the current batch of nvme updates for 4.18, we have a few more
       patches in the queue, but I'd like to get this pile into your tree
       and linux-next ASAP.
      
       The biggest item is support for file-backed namespaces in the NVMe
       target from Chaitanya, in addition to that we mostly small fixes from
       all the usual suspects."
      
      * 'nvme-4.18-2' of git://git.infradead.org/nvme:
        nvme: fixup memory leak in nvme_init_identify()
        nvme: fix KASAN warning when parsing host nqn
        nvmet-loop: use nr_phys_segments when map rq to sgl
        nvmet-fc: increase LS buffer count per fc port
        nvmet: add simple file backed ns support
        nvmet: remove duplicate NULL initialization for req->ns
        nvmet: make a few error messages more generic
        nvme-fabrics: allow duplicate connections to the discovery controller
        nvme-fabrics: centralize discovery controller defaults
        nvme-fabrics: remove unnecessary controller subnqn validation
        nvme-fc: remove setting DNR on exception conditions
        nvme-rdma: stop admin queue before freeing it
        nvme-pci: Fix AER reset handling
        nvme-pci: set nvmeq->cq_vector after alloc cq/sq
        nvme: host: core: fix precedence of ternary operator
        nvme: fix lockdep warning in nvme_mpath_clear_current_path
      b7405176
  3. 29 5月, 2018 21 次提交
  4. 25 5月, 2018 13 次提交