Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2016 22:03:07 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2016 22:03:07 +0000 (15:03 -0700)
Pull core block updates from Jens Axboe:

   - the big change is the cleanup from Mike Christie, cleaning up our
     uses of command types and modified flags.  This is what will throw
     some merge conflicts

   - regression fix for the above for btrfs, from Vincent

   - following up to the above, better packing of struct request from
     Christoph

   - a 2038 fix for blktrace from Arnd

   - a few trivial/spelling fixes from Bart Van Assche

   - a front merge check fix from Damien, which could cause issues on
     SMR drives

   - Atari partition fix from Gabriel

   - convert cfq to highres timers, since jiffies isn't granular enough
     for some devices these days.  From Jan and Jeff

   - CFQ priority boost fix idle classes, from me

   - cleanup series from Ming, improving our bio/bvec iteration

   - a direct issue fix for blk-mq from Omar

   - fix for plug merging not involving the IO scheduler, like we do for
     other types of merges.  From Tahsin

   - expose DAX type internally and through sysfs.  From Toshi and Yigal

* 'for-4.8/core' of git://git.kernel.dk/linux-block: (76 commits)
  block: Fix front merge check
  block: do not merge requests without consulting with io scheduler
  block: Fix spelling in a source code comment
  block: expose QUEUE_FLAG_DAX in sysfs
  block: add QUEUE_FLAG_DAX for devices to advertise their DAX support
  Btrfs: fix comparison in __btrfs_map_block()
  block: atari: Return early for unsupported sector size
  Doc: block: Fix a typo in queue-sysfs.txt
  cfq-iosched: Charge at least 1 jiffie instead of 1 ns
  cfq-iosched: Fix regression in bonnie++ rewrite performance
  cfq-iosched: Convert slice_resid from u64 to s64
  block: Convert fifo_time from ulong to u64
  blktrace: avoid using timespec
  block/blk-cgroup.c: Declare local symbols static
  block/bio-integrity.c: Add #include "blk.h"
  block/partition-generic.c: Remove a set-but-not-used variable
  block: bio: kill BIO_MAX_SIZE
  cfq-iosched: temporarily boost queue priority for idle classes
  block: drbd: avoid to use BIO_MAX_SIZE
  block: bio: remove BIO_MAX_SECTORS
  ...

26 files changed:
1  2 
block/blk-lib.c
block/blk-mq.c
drivers/ata/libata-scsi.c
drivers/block/nbd.c
drivers/block/xen-blkfront.c
drivers/mmc/card/block.c
drivers/nvme/host/core.c
drivers/scsi/sd.c
fs/btrfs/check-integrity.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c
fs/btrfs/volumes.c
fs/buffer.c
fs/gfs2/dir.c
fs/gfs2/lops.c
fs/gfs2/ops_fstype.c
fs/gfs2/quota.c
fs/jbd2/journal.c
fs/ocfs2/buffer_head_io.c
fs/reiserfs/super.c
include/linux/buffer_head.h

diff --cc block/blk-lib.c
index 9e29dc35169560a223ae7eea9dffc80da15fc7f9,ff2a7f04af4df84475e107e2d2d244da6739eb1e..9031d2af0b47c4210fe1db182545e1a806def18b
@@@ -104,16 -106,15 +106,16 @@@ int blkdev_issue_discard(struct block_d
        int ret;
  
        if (flags & BLKDEV_DISCARD_SECURE)
-               type |= REQ_SECURE;
+               op_flags |= REQ_SECURE;
  
        blk_start_plug(&plug);
-       ret = __blkdev_issue_discard(bdev, sector, nr_sects, gfp_mask, type,
+       ret = __blkdev_issue_discard(bdev, sector, nr_sects, gfp_mask, op_flags,
                        &bio);
        if (!ret && bio) {
-               ret = submit_bio_wait(type, bio);
+               ret = submit_bio_wait(bio);
                if (ret == -EOPNOTSUPP)
                        ret = 0;
 +              bio_put(bio);
        }
        blk_finish_plug(&plug);
  
@@@ -166,10 -168,8 +169,10 @@@ int blkdev_issue_write_same(struct bloc
                }
        }
  
 -      if (bio)
 +      if (bio) {
-               ret = submit_bio_wait(REQ_WRITE | REQ_WRITE_SAME, bio);
+               ret = submit_bio_wait(bio);
 +              bio_put(bio);
 +      }
        return ret != -EOPNOTSUPP ? ret : 0;
  }
  EXPORT_SYMBOL(blkdev_issue_write_same);
@@@ -209,11 -209,8 +212,11 @@@ static int __blkdev_issue_zeroout(struc
                }
        }
  
 -      if (bio)
 -              return submit_bio_wait(bio);
 +      if (bio) {
-               ret = submit_bio_wait(WRITE, bio);
++              ret = submit_bio_wait(bio);
 +              bio_put(bio);
 +              return ret;
 +      }
        return 0;
  }
  
diff --cc block/blk-mq.c
Simple merge
Simple merge
Simple merge
index fcc5b4e0aef29ed8d5e863e0277687e1abe700e6,343ef7abe5fd302e41cb26aff41e83d7392d98a1..da05d3f9bad206b193135e44b7c979894b50e42a
@@@ -2093,38 -2139,6 +2089,40 @@@ static int blkfront_resume(struct xenbu
  
        dev_dbg(&dev->dev, "blkfront_resume: %s\n", dev->nodename);
  
-                       if (shadow[j].request->cmd_flags &
-                                       (REQ_FLUSH | REQ_FUA | REQ_DISCARD | REQ_SECURE)) {
 +      bio_list_init(&info->bio_list);
 +      INIT_LIST_HEAD(&info->requests);
 +      for (i = 0; i < info->nr_rings; i++) {
 +              struct blkfront_ring_info *rinfo = &info->rinfo[i];
 +              struct bio_list merge_bio;
 +              struct blk_shadow *shadow = rinfo->shadow;
 +
 +              for (j = 0; j < BLK_RING_SIZE(info); j++) {
 +                      /* Not in use? */
 +                      if (!shadow[j].request)
 +                              continue;
 +
 +                      /*
 +                       * Get the bios in the request so we can re-queue them.
 +                       */
++                      if (req_op(shadow[i].request) == REQ_OP_FLUSH ||
++                          req_op(shadow[i].request) == REQ_OP_DISCARD ||
++                          shadow[j].request->cmd_flags & (REQ_FUA | REQ_SECURE)) {
++                          
 +                              /*
 +                               * Flush operations don't contain bios, so
 +                               * we need to requeue the whole request
 +                               */
 +                              list_add(&shadow[j].request->queuelist, &info->requests);
 +                              continue;
 +                      }
 +                      merge_bio.head = shadow[j].request->bio;
 +                      merge_bio.tail = shadow[j].request->biotail;
 +                      bio_list_merge(&info->bio_list, &merge_bio);
 +                      shadow[j].request->bio = NULL;
 +                      blk_mq_end_request(shadow[j].request, 0);
 +              }
 +      }
 +
        blkif_free(info, info->connected == BLKIF_STATE_CONNECTED);
  
        err = negotiate_mq(info);
Simple merge
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
diff --cc fs/gfs2/dir.c
Simple merge
diff --cc fs/gfs2/lops.c
Simple merge
Simple merge
diff --cc fs/gfs2/quota.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge