Merge tag 'for-6.8/block-2024-01-08' of git://git.kernel.dk/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jan 2024 21:58:04 +0000 (13:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jan 2024 21:58:04 +0000 (13:58 -0800)
Pull block updates from Jens Axboe:
 "Pretty quiet round this time around. This contains:

   - NVMe updates via Keith:
        - nvme fabrics spec updates (Guixin, Max)
        - nvme target udpates (Guixin, Evan)
        - nvme attribute refactoring (Daniel)
        - nvme-fc numa fix (Keith)

   - MD updates via Song:
        - Fix/Cleanup RCU usage from conf->disks[i].rdev (Yu Kuai)
        - Fix raid5 hang issue (Junxiao Bi)
        - Add Yu Kuai as Reviewer of the md subsystem
        - Remove deprecated flavors (Song Liu)
        - raid1 read error check support (Li Nan)
        - Better handle events off-by-1 case (Alex Lyakas)

   - Efficiency improvements for passthrough (Kundan)

   - Support for mapping integrity data directly (Keith)

   - Zoned write fix (Damien)

   - rnbd fixes (Kees, Santosh, Supriti)

   - Default to a sane discard size granularity (Christoph)

   - Make the default max transfer size naming less confusing
     (Christoph)

   - Remove support for deprecated host aware zoned model (Christoph)

   - Misc fixes (me, Li, Matthew, Min, Ming, Randy, liyouhong, Daniel,
     Bart, Christoph)"

* tag 'for-6.8/block-2024-01-08' of git://git.kernel.dk/linux: (78 commits)
  block: Treat sequential write preferred zone type as invalid
  block: remove disk_clear_zoned
  sd: remove the !ZBC && blk_queue_is_zoned case in sd_read_block_characteristics
  drivers/block/xen-blkback/common.h: Fix spelling typo in comment
  blk-cgroup: fix rcu lockdep warning in blkg_lookup()
  blk-cgroup: don't use removal safe list iterators
  block: floor the discard granularity to the physical block size
  mtd_blkdevs: use the default discard granularity
  bcache: use the default discard granularity
  zram: use the default discard granularity
  null_blk: use the default discard granularity
  nbd: use the default discard granularity
  ubd: use the default discard granularity
  block: default the discard granularity to sector size
  bcache: discard_granularity should not be smaller than a sector
  block: remove two comments in bio_split_discard
  block: rename and document BLK_DEF_MAX_SECTORS
  loop: don't abuse BLK_DEF_MAX_SECTORS
  aoe: don't abuse BLK_DEF_MAX_SECTORS
  null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS
  ...

26 files changed:
1  2 
MAINTAINERS
block/blk-core.c
block/blk-mq.c
block/blk-sysfs.c
drivers/block/loop.c
drivers/block/ublk_drv.c
drivers/block/virtio_blk.c
drivers/block/zram/zram_drv.c
drivers/md/Kconfig
drivers/md/bcache/super.c
drivers/md/md.c
drivers/md/raid5.c
drivers/mtd/mtd_blkdevs.c
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/ioctl.c
drivers/nvme/host/nvme.h
drivers/nvme/host/rdma.c
drivers/nvme/target/configfs.c
drivers/scsi/sd.c
fs/btrfs/zoned.c
fs/btrfs/zoned.h
fs/f2fs/super.c
include/linux/blk_types.h
include/linux/blkdev.h
io_uring/uring_cmd.c

diff --cc MAINTAINERS
Simple merge
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/md.c
Simple merge
Simple merge
Simple merge
@@@ -1903,10 -1899,9 +1912,10 @@@ static void nvme_update_disk_info(struc
  
        /*
         * The block layer can't support LBA sizes larger than the page size
 -       * yet, so catch this early and don't allow block I/O.
 +       * or smaller than a sector size yet, so catch this early and don't
 +       * allow block I/O.
         */
-       if (ns->lba_shift > PAGE_SHIFT || ns->lba_shift < SECTOR_SHIFT) {
 -      if (head->lba_shift > PAGE_SHIFT) {
++      if (head->lba_shift > PAGE_SHIFT || head->lba_shift < SECTOR_SHIFT) {
                capacity = 0;
                bs = (1 << 9);
        }
@@@ -2043,19 -2038,13 +2052,20 @@@ static int nvme_update_ns_info_block(st
        if (ret)
                return ret;
  
 +      if (id->ncap == 0) {
 +              /* namespace not allocated or attached */
 +              info->is_removed = true;
 +              ret = -ENODEV;
 +              goto error;
 +      }
 +
        blk_mq_freeze_queue(ns->disk->queue);
        lbaf = nvme_lbaf_index(id->flbas);
-       ns->lba_shift = id->lbaf[lbaf].ds;
+       ns->head->lba_shift = id->lbaf[lbaf].ds;
+       ns->head->nuse = le64_to_cpu(id->nuse);
        nvme_set_queue_limits(ns->ctrl, ns->queue);
  
-       ret = nvme_configure_metadata(ns, id);
+       ret = nvme_configure_metadata(ns->ctrl, ns->head, id);
        if (ret < 0) {
                blk_mq_unfreeze_queue(ns->disk->queue);
                goto out;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -319,8 -323,8 +319,8 @@@ static inline bool btrfs_check_device_z
                        (bdev_zone_sectors(bdev) << SECTOR_SHIFT);
        }
  
 -      /* Do not allow Host Manged zoned device */
 +      /* Do not allow Host Managed zoned device. */
-       return bdev_zoned_model(bdev) != BLK_ZONED_HM;
+       return !bdev_is_zoned(bdev);
  }
  
  static inline bool btrfs_check_super_location(struct btrfs_device *device, u64 pos)
diff --cc fs/f2fs/super.c
Simple merge
Simple merge
Simple merge
Simple merge