Merge branch 'for-4.10/block' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Dec 2016 18:19:16 +0000 (10:19 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Dec 2016 18:19:16 +0000 (10:19 -0800)
Pull block layer updates from Jens Axboe:
 "This is the main block pull request this series. Contrary to previous
  release, I've kept the core and driver changes in the same branch. We
  always ended up having dependencies between the two for obvious
  reasons, so makes more sense to keep them together. That said, I'll
  probably try and keep more topical branches going forward, especially
  for cycles that end up being as busy as this one.

  The major parts of this pull request is:

   - Improved support for O_DIRECT on block devices, with a small
     private implementation instead of using the pig that is
     fs/direct-io.c. From Christoph.

   - Request completion tracking in a scalable fashion. This is utilized
     by two components in this pull, the new hybrid polling and the
     writeback queue throttling code.

   - Improved support for polling with O_DIRECT, adding a hybrid mode
     that combines pure polling with an initial sleep. From me.

   - Support for automatic throttling of writeback queues on the block
     side. This uses feedback from the device completion latencies to
     scale the queue on the block side up or down. From me.

   - Support from SMR drives in the block layer and for SD. From Hannes
     and Shaun.

   - Multi-connection support for nbd. From Josef.

   - Cleanup of request and bio flags, so we have a clear split between
     which are bio (or rq) private, and which ones are shared. From
     Christoph.

   - A set of patches from Bart, that improve how we handle queue
     stopping and starting in blk-mq.

   - Support for WRITE_ZEROES from Chaitanya.

   - Lightnvm updates from Javier/Matias.

   - Supoort for FC for the nvme-over-fabrics code. From James Smart.

   - A bunch of fixes from a whole slew of people, too many to name
     here"

* 'for-4.10/block' of git://git.kernel.dk/linux-block: (182 commits)
  blk-stat: fix a few cases of missing batch flushing
  blk-flush: run the queue when inserting blk-mq flush
  elevator: make the rqhash helpers exported
  blk-mq: abstract out blk_mq_dispatch_rq_list() helper
  blk-mq: add blk_mq_start_stopped_hw_queue()
  block: improve handling of the magic discard payload
  blk-wbt: don't throttle discard or write zeroes
  nbd: use dev_err_ratelimited in io path
  nbd: reset the setup task for NBD_CLEAR_SOCK
  nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME
  nvme-fabrics: Add target support for FC transport
  nvme-fabrics: Add host support for FC transport
  nvme-fabrics: Add FC transport LLDD api definitions
  nvme-fabrics: Add FC transport FC-NVME definitions
  nvme-fabrics: Add FC transport error codes to nvme.h
  Add type 0x28 NVME type code to scsi fc headers
  nvme-fabrics: patch target code in prep for FC transport support
  nvme-fabrics: set sqe.command_id in core not transports
  parser: add u64 number parser
  nvme-rdma: align to generic ib_event logging helper
  ...

35 files changed:
1  2 
MAINTAINERS
block/blk-flush.c
block/blk-map.c
block/blk-settings.c
block/blk-sysfs.c
drivers/md/dm-raid1.c
drivers/md/dm-rq.c
drivers/md/dm.c
drivers/md/md.c
drivers/md/raid5-cache.c
drivers/mmc/card/block.c
drivers/mmc/card/queue.c
drivers/nvme/host/core.c
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/scsi.c
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/rdma.c
drivers/scsi/device_handler/scsi_dh_alua.c
drivers/scsi/st.c
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/buffer.c
fs/cifs/connect.c
fs/ext4/super.c
fs/f2fs/gc.c
fs/ocfs2/cluster/heartbeat.c
fs/splice.c
include/linux/backing-dev-defs.h
include/linux/fs.h
include/linux/nvme.h
include/linux/swap.h
include/uapi/linux/Kbuild
lib/iov_iter.c

diff --cc MAINTAINERS
Simple merge
@@@ -343,34 -341,6 +341,34 @@@ static void flush_data_end_io(struct re
        struct blk_flush_queue *fq = blk_get_flush_queue(q, NULL);
  
        /*
-       rq->cmd_flags &= ~REQ_STARTED;
 +       * Updating q->in_flight[] here for making this tag usable
 +       * early. Because in blk_queue_start_tag(),
 +       * q->in_flight[BLK_RW_ASYNC] is used to limit async I/O and
 +       * reserve tags for sync I/O.
 +       *
 +       * More importantly this way can avoid the following I/O
 +       * deadlock:
 +       *
 +       * - suppose there are 40 fua requests comming to flush queue
 +       *   and queue depth is 31
 +       * - 30 rqs are scheduled then blk_queue_start_tag() can't alloc
 +       *   tag for async I/O any more
 +       * - all the 30 rqs are completed before FLUSH_PENDING_TIMEOUT
 +       *   and flush_data_end_io() is called
 +       * - the other rqs still can't go ahead if not updating
 +       *   q->in_flight[BLK_RW_ASYNC] here, meantime these rqs
 +       *   are held in flush data queue and make no progress of
 +       *   handling post flush rq
 +       * - only after the post flush rq is handled, all these rqs
 +       *   can be completed
 +       */
 +
 +      elv_completed_request(q, rq);
 +
 +      /* for avoiding double accounting */
++      rq->rq_flags &= ~RQF_STARTED;
 +
 +      /*
         * After populating an empty queue, kick it to avoid stall.  Read
         * the comment in flush_end_io().
         */
diff --cc block/blk-map.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc drivers/md/dm.c
Simple merge
diff --cc drivers/md/md.c
Simple merge
Simple merge
@@@ -1732,18 -2113,28 +1732,18 @@@ static int mmc_blk_issue_rw_rq(struct m
        return 1;
  
   cmd_abort:
 -      if (mmc_packed_cmd(mq_rq->cmd_type)) {
 -              mmc_blk_abort_packed_req(mq_rq);
 -      } else {
 -              if (mmc_card_removed(card))
 -                      req->rq_flags |= RQF_QUIET;
 -              while (ret)
 -                      ret = blk_end_request(req, -EIO,
 -                                      blk_rq_cur_bytes(req));
 -      }
 +      if (mmc_card_removed(card))
-               req->cmd_flags |= REQ_QUIET;
++              req->rq_flags |= RQF_QUIET;
 +      while (ret)
 +              ret = blk_end_request(req, -EIO,
 +                              blk_rq_cur_bytes(req));
  
   start_new_req:
        if (rqc) {
                if (mmc_card_removed(card)) {
-                       rqc->cmd_flags |= REQ_QUIET;
+                       rqc->rq_flags |= RQF_QUIET;
                        blk_end_request_all(rqc, -EIO);
                } else {
 -                      /*
 -                       * If current request is packed, it needs to put back.
 -                       */
 -                      if (mmc_packed_cmd(mq->mqrq_cur->cmd_type))
 -                              mmc_blk_revert_packed_req(mq, mq->mqrq_cur);
 -
                        mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
                        mmc_start_req(card->host,
                                      &mq->mqrq_cur->mmc_active, NULL);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/buffer.c
Simple merge
Simple merge
diff --cc fs/ext4/super.c
Simple merge
diff --cc fs/f2fs/gc.c
Simple merge
Simple merge
diff --cc fs/splice.c
Simple merge
Simple merge
Simple merge
@@@ -970,9 -961,21 +990,22 @@@ enum 
        NVME_SC_REFTAG_CHECK            = 0x284,
        NVME_SC_COMPARE_FAILED          = 0x285,
        NVME_SC_ACCESS_DENIED           = 0x286,
 +      NVME_SC_UNWRITTEN_BLOCK         = 0x287,
  
        NVME_SC_DNR                     = 0x4000,
+       /*
+        * FC Transport-specific error status values for NVME commands
+        *
+        * Transport-specific status code values must be in the range 0xB0..0xBF
+        */
+       /* Generic FC failure - catchall */
+       NVME_SC_FC_TRANSPORT_ERROR      = 0x00B0,
+       /* I/O failure due to FC ABTS'd */
+       NVME_SC_FC_TRANSPORT_ABORTED    = 0x00B1,
  };
  
  struct nvme_completion {
Simple merge
Simple merge
diff --cc lib/iov_iter.c
Simple merge