Merge tag 'for-5.9/block-20200802' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Aug 2020 18:57:03 +0000 (11:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Aug 2020 18:57:03 +0000 (11:57 -0700)
Pull core block updates from Jens Axboe:
 "Good amount of cleanups and tech debt removals in here, and as a
  result, the diffstat shows a nice net reduction in code.

   - Softirq completion cleanups (Christoph)

   - Stop using ->queuedata (Christoph)

   - Cleanup bd claiming (Christoph)

   - Use check_events, moving away from the legacy media change
     (Christoph)

   - Use inode i_blkbits consistently (Christoph)

   - Remove old unused writeback congestion bits (Christoph)

   - Cleanup/unify submission path (Christoph)

   - Use bio_uninit consistently, instead of bio_disassociate_blkg
     (Christoph)

   - sbitmap cleared bits handling (John)

   - Request merging blktrace event addition (Jan)

   - sysfs add/remove race fixes (Luis)

   - blk-mq tag fixes/optimizations (Ming)

   - Duplicate words in comments (Randy)

   - Flush deferral cleanup (Yufen)

   - IO context locking/retry fixes (John)

   - struct_size() usage (Gustavo)

   - blk-iocost fixes (Chengming)

   - blk-cgroup IO stats fixes (Boris)

   - Various little fixes"

* tag 'for-5.9/block-20200802' of git://git.kernel.dk/linux-block: (135 commits)
  block: blk-timeout: delete duplicated word
  block: blk-mq-sched: delete duplicated word
  block: blk-mq: delete duplicated word
  block: genhd: delete duplicated words
  block: elevator: delete duplicated word and fix typos
  block: bio: delete duplicated words
  block: bfq-iosched: fix duplicated word
  iocost_monitor: start from the oldest usage index
  iocost: Fix check condition of iocg abs_vdebt
  block: Remove callback typedefs for blk_mq_ops
  block: Use non _rcu version of list functions for tag_set_list
  blk-cgroup: show global disk stats in root cgroup io.stat
  blk-cgroup: make iostat functions visible to stat printing
  block: improve discard bio alignment in __blkdev_issue_discard()
  block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers
  block: defer flush request no matter whether we have elevator
  block: make blk_timeout_init() static
  block: remove retry loop in ioc_release_fn()
  block: remove unnecessary ioc nested locking
  block: integrate bd_start_claiming into __blkdev_get
  ...

24 files changed:
1  2 
Documentation/admin-guide/cgroup-v2.rst
block/blk-mq-debugfs.c
block/blk-mq.c
drivers/block/nbd.c
drivers/block/virtio_blk.c
drivers/block/zram/zram_drv.c
drivers/md/dm-integrity.c
drivers/md/dm-rq.c
drivers/md/dm-writecache.c
drivers/md/dm-zoned-target.c
drivers/md/dm.c
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
drivers/nvme/target/loop.c
drivers/scsi/scsi_lib.c
fs/btrfs/disk-io.c
fs/buffer.c
include/linux/blkdev.h
include/linux/device-mapper.h
include/linux/fs.h

Simple merge
diff --cc block/blk-mq.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc drivers/md/dm.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1651,54 -1617,6 +1651,33 @@@ fail
  }
  
  /*
- static int btrfs_congested_fn(void *congested_data, int bdi_bits)
- {
-       struct btrfs_fs_info *info = (struct btrfs_fs_info *)congested_data;
-       int ret = 0;
-       struct btrfs_device *device;
-       struct backing_dev_info *bdi;
-       rcu_read_lock();
-       list_for_each_entry_rcu(device, &info->fs_devices->devices, dev_list) {
-               if (!device->bdev)
-                       continue;
-               bdi = device->bdev->bd_bdi;
-               if (bdi_congested(bdi, bdi_bits)) {
-                       ret = 1;
-                       break;
-               }
-       }
-       rcu_read_unlock();
-       return ret;
- }
 + * Get in-memory reference of a root structure
 + *
 + * @objectid: tree objectid
 + * @check_ref:        if set, verify that the tree exists and the item has at least
 + *            one reference
 + */
 +struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info,
 +                                   u64 objectid, bool check_ref)
 +{
 +      return btrfs_get_root_ref(fs_info, objectid, 0, check_ref);
 +}
 +
 +/*
 + * Get in-memory reference of a root structure, created as new, optionally pass
 + * the anonymous block device id
 + *
 + * @objectid: tree objectid
 + * @anon_dev: if zero, allocate a new anonymous block device or use the
 + *            parameter value
 + */
 +struct btrfs_root *btrfs_get_new_fs_root(struct btrfs_fs_info *fs_info,
 +                                       u64 objectid, dev_t anon_dev)
 +{
 +      return btrfs_get_root_ref(fs_info, objectid, anon_dev, true);
 +}
 +
 +/*
   * called by the kthread helper functions to finally call the bio end_io
   * functions.  This is where read checksum verification actually happens
   */
diff --cc fs/buffer.c
@@@ -3039,14 -3040,7 +3039,10 @@@ static int submit_bh_wbc(int op, int op
        if (test_set_buffer_req(bh) && (op == REQ_OP_WRITE))
                clear_buffer_write_io_error(bh);
  
-       /*
-        * from here on down, it's all bio -- do the initial mapping,
-        * submit_bio -> generic_make_request may further map this bio around
-        */
        bio = bio_alloc(GFP_NOIO, 1);
 +
 +      fscrypt_set_bio_crypt_ctx_bh(bio, bh, GFP_NOIO);
 +
        bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9);
        bio_set_dev(bio, bh->b_bdev);
        bio->bi_write_hint = write_hint;
Simple merge
Simple merge
Simple merge