]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'for-4.13/block' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Jul 2017 17:34:51 +0000 (10:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Jul 2017 17:34:51 +0000 (10:34 -0700)
Pull core block/IO updates from Jens Axboe:
 "This is the main pull request for the block layer for 4.13. Not a huge
  round in terms of features, but there's a lot of churn related to some
  core cleanups.

  Note this depends on the UUID tree pull request, that Christoph
  already sent out.

  This pull request contains:

   - A series from Christoph, unifying the error/stats codes in the
     block layer. We now use blk_status_t everywhere, instead of using
     different schemes for different places.

   - Also from Christoph, some cleanups around request allocation and IO
     scheduler interactions in blk-mq.

   - And yet another series from Christoph, cleaning up how we handle
     and do bounce buffering in the block layer.

   - A blk-mq debugfs series from Bart, further improving on the support
     we have for exporting internal information to aid debugging IO
     hangs or stalls.

   - Also from Bart, a series that cleans up the request initialization
     differences across types of devices.

   - A series from Goldwyn Rodrigues, allowing the block layer to return
     failure if we will block and the user asked for non-blocking.

   - Patch from Hannes for supporting setting loop devices block size to
     that of the underlying device.

   - Two series of patches from Javier, fixing various issues with
     lightnvm, particular around pblk.

   - A series from me, adding support for write hints. This comes with
     NVMe support as well, so applications can help guide data placement
     on flash to improve performance, latencies, and write
     amplification.

   - A series from Ming, improving and hardening blk-mq support for
     stopping/starting and quiescing hardware queues.

   - Two pull requests for NVMe updates. Nothing major on the feature
     side, but lots of cleanups and bug fixes. From the usual crew.

   - A series from Neil Brown, greatly improving the bio rescue set
     support. Most notably, this kills the bio rescue work queues, if we
     don't really need them.

   - Lots of other little bug fixes that are all over the place"

* 'for-4.13/block' of git://git.kernel.dk/linux-block: (217 commits)
  lightnvm: pblk: set line bitmap check under debug
  lightnvm: pblk: verify that cache read is still valid
  lightnvm: pblk: add initialization check
  lightnvm: pblk: remove target using async. I/Os
  lightnvm: pblk: use vmalloc for GC data buffer
  lightnvm: pblk: use right metadata buffer for recovery
  lightnvm: pblk: schedule if data is not ready
  lightnvm: pblk: remove unused return variable
  lightnvm: pblk: fix double-free on pblk init
  lightnvm: pblk: fix bad le64 assignations
  nvme: Makefile: remove dead build rule
  blk-mq: map all HWQ also in hyperthreaded system
  nvmet-rdma: register ib_client to not deadlock in device removal
  nvme_fc: fix error recovery on link down.
  nvmet_fc: fix crashes on bad opcodes
  nvme_fc: Fix crash when nvme controller connection fails.
  nvme_fc: replace ioabort msleep loop with completion
  nvme_fc: fix double calls to nvme_cleanup_cmd()
  nvme-fabrics: verify that a controller returns the correct NQN
  nvme: simplify nvme_dev_attrs_are_visible
  ...

1  2 
block/bio.c
drivers/md/dm-integrity.c
drivers/md/dm-io.c
drivers/md/dm-raid1.c
drivers/md/dm-thin.c
drivers/nvme/host/pci.c
fs/block_dev.c
fs/read_write.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_buf.c
include/linux/bio.h

diff --cc block/bio.c
Simple merge
Simple merge
index 8d5ca30f655123611b5dcd2ba3d35b52e9c6c447,81248a8a8b5706dfe6a03d4cbab3aa0b5910f2d4..25039607f3cb629cdd9a5d432075ebc609455fb9
@@@ -317,9 -318,9 +318,9 @@@ static void do_region(int op, int op_fl
        else if (op == REQ_OP_WRITE_SAME)
                special_cmd_max_sectors = q->limits.max_write_same_sectors;
        if ((op == REQ_OP_DISCARD || op == REQ_OP_WRITE_ZEROES ||
 -           op == REQ_OP_WRITE_SAME)  &&
 -          special_cmd_max_sectors == 0) {
 +           op == REQ_OP_WRITE_SAME) && special_cmd_max_sectors == 0) {
 +              atomic_inc(&io->count);
-               dec_count(io, region, -EOPNOTSUPP);
+               dec_count(io, region, BLK_STS_NOTSUPP);
                return;
        }
  
index 4da8858856fb3019c16d5681c241f8733dca21ec,3ab584b686e0ca9c64223737384e44a55f0cff34..a4fbd911d566e5d3bfc6637f0ebdfc0b15472b73
@@@ -1255,26 -1253,16 +1256,26 @@@ static int mirror_end_io(struct dm_targ
                if (!(bio->bi_opf & REQ_PREFLUSH) &&
                    bio_op(bio) != REQ_OP_DISCARD)
                        dm_rh_dec(ms->rh, bio_record->write_region);
-               return error;
+               return DM_ENDIO_DONE;
        }
  
-       if (error == -EOPNOTSUPP)
+       if (*error == BLK_STS_NOTSUPP)
 -              return DM_ENDIO_DONE;
 +              goto out;
  
-       if ((error == -EWOULDBLOCK) && (bio->bi_opf & REQ_RAHEAD))
+       if (bio->bi_opf & REQ_RAHEAD)
 -              return DM_ENDIO_DONE;
 +              goto out;
  
-       if (unlikely(error)) {
+       if (unlikely(*error)) {
 +              if (!bio_record->details.bi_bdev) {
 +                      /*
 +                       * There wasn't enough memory to record necessary
 +                       * information for a retry or there was no other
 +                       * mirror in-sync.
 +                       */
 +                      DMERR_LIMIT("Mirror read failed.");
-                       return -EIO;
++                      return DM_ENDIO_DONE;
 +              }
 +
                m = bio_record->m;
  
                DMERR("Mirror read failed from %s. Trying alternative device.",
                        bd = &bio_record->details;
  
                        dm_bio_restore(bd, bio);
-                       bio->bi_error = 0;
 +                      bio_record->details.bi_bdev = NULL;
+                       bio->bi_status = 0;
  
                        queue_bio(ms, bio, rw);
                        return DM_ENDIO_INCOMPLETE;
                DMERR("All replicated volumes dead, failing I/O");
        }
  
-       return error;
 +out:
 +      bio_record->details.bi_bdev = NULL;
 +
+       return DM_ENDIO_DONE;
  }
  
  static void mirror_presuspend(struct dm_target *ti)
Simple merge
Simple merge
diff --cc fs/block_dev.c
index 0a7404ef9335bf7ea19926e2896c9b737951afe5,2c5f08696fff0ada5d4a54ba334cdb93e3861554..a7df151f8aba8ba1447ff4094192754fbea76426
@@@ -262,11 -263,8 +263,11 @@@ __blkdev_direct_IO_simple(struct kiocb 
        if (vecs != inline_vecs)
                kfree(vecs);
  
-       if (unlikely(bio.bi_error))
-               ret = bio.bi_error;
+       if (unlikely(bio.bi_status))
 -              return blk_status_to_errno(bio.bi_status);
++              ret = blk_status_to_errno(bio.bi_status);
 +
 +      bio_uninit(&bio);
 +
        return ret;
  }
  
diff --cc fs/read_write.c
Simple merge
Simple merge
Simple merge
Simple merge