]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge tag 'for-6.19/block-20251201' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Dec 2025 03:26:18 +0000 (19:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Dec 2025 03:26:18 +0000 (19:26 -0800)
Pull block updates from Jens Axboe:

 - Fix head insertion for mq-deadline, a regression from when priority
   support was added

 - Series simplifying and improving the ublk user copy code

 - Various ublk related cleanups

 - Fixup REQ_NOWAIT handling in loop/zloop, clearing NOWAIT when the
   request is punted to a thread for handling

 - Merge and then later revert loop dio nowait support, as it ended up
   causing excessive stack usage for when the inline issue code needs to
   dip back into the full file system code

 - Improve auto integrity code, making it less deadlock prone

 - Speedup polled IO handling, but manually managing the hctx lookups

 - Fixes for blk-throttle for SSD devices

 - Small series with fixes for the S390 dasd driver

 - Add support for caching zones, avoiding unnecessary report zone
   queries

 - MD pull requests via Yu:
      - fix null-ptr-dereference regression for dm-raid0
      - fix IO hang for raid5 when array is broken with IO inflight
      - remove legacy 1s delay to speed up system shutdown
      - change maintainer's email address
      - data can be lost if array is created with different lbs devices,
        fix this problem and record lbs of the array in metadata
      - fix rcu protection for md_thread
      - fix mddev kobject lifetime regression
      - enable atomic writes for md-linear
      - some cleanups

 - bcache updates via Coly
      - remove useless discard and cache device code
      - improve usage of per-cpu workqueues

 - Reorganize the IO scheduler switching code, fixing some lockdep
   reports as well

 - Improve the block layer P2P DMA support

 - Add support to the block tracing code for zoned devices

 - Segment calculation improves, and memory alignment flexibility
   improvements

 - Set of prep and cleanups patches for ublk batching support. The
   actual batching hasn't been added yet, but helps shrink down the
   workload of getting that patchset ready for 6.20

 - Fix for how the ps3 block driver handles segments offsets

 - Improve how block plugging handles batch tag allocations

 - nbd fixes for use-after-free of the configuration on device clear/put

 - Set of improvements and fixes for zloop

 - Add Damien as maintainer of the block zoned device code handling

 - Various other fixes and cleanups

* tag 'for-6.19/block-20251201' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (162 commits)
  block/rnbd: correct all kernel-doc complaints
  blk-mq: use queue_hctx in blk_mq_map_queue_type
  md: remove legacy 1s delay in md_notify_reboot
  md/raid5: fix IO hang when array is broken with IO inflight
  md: warn about updating super block failure
  md/raid0: fix NULL pointer dereference in create_strip_zones() for dm-raid
  sbitmap: fix all kernel-doc warnings
  ublk: add helper of __ublk_fetch()
  ublk: pass const pointer to ublk_queue_is_zoned()
  ublk: refactor auto buffer register in ublk_dispatch_req()
  ublk: add `union ublk_io_buf` with improved naming
  ublk: add parameter `struct io_uring_cmd *` to ublk_prep_auto_buf_reg()
  kfifo: add kfifo_alloc_node() helper for NUMA awareness
  blk-mq: fix potential uaf for 'queue_hw_ctx'
  blk-mq: use array manage hctx map instead of xarray
  ublk: prevent invalid access with DEBUG
  s390/dasd: Use scnprintf() instead of sprintf()
  s390/dasd: Move device name formatting into separate function
  s390/dasd: Remove unnecessary debugfs_create() return checks
  s390/dasd: Fix gendisk parent after copy pair swap
  ...

17 files changed:
1  2 
MAINTAINERS
block/blk-settings.c
block/ioctl.c
drivers/block/drbd/drbd_receiver.c
drivers/block/nbd.c
drivers/block/ublk_drv.c
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/multipath.c
drivers/nvme/host/pci.c
drivers/nvme/host/tcp.c
drivers/s390/block/dasd.c
drivers/s390/block/dasd_eckd.c
fs/btrfs/zoned.c
fs/xfs/xfs_zone_alloc.c
include/linux/backing-dev-defs.h
include/linux/blk_types.h

diff --cc MAINTAINERS
Simple merge
index d74b13ec8e548ca1b972e9a5c53af9c402e0798a,b38e94c85402a5e60510d2a75603829505493dea..51401f08ce05bed14f2031e033bab8342ca70559
@@@ -184,16 -197,14 +197,24 @@@ static int blk_validate_integrity_limit
        if (!bi->interval_exp)
                bi->interval_exp = ilog2(lim->logical_block_size);
  
 +      /*
 +       * The PI generation / validation helpers do not expect intervals to
 +       * straddle multiple bio_vecs.  Enforce alignment so that those are
 +       * never generated, and that each buffer is aligned as expected.
 +       */
 +      if (bi->csum_type) {
 +              lim->dma_alignment = max(lim->dma_alignment,
 +                                      (1U << bi->interval_exp) - 1);
 +      }
 +
+       /*
+        * The block layer automatically adds integrity data for bios that don't
+        * already have it.  Limit the I/O size so that a single maximum size
+        * metadata segment can cover the integrity data for the entire I/O.
+        */
+       lim->max_sectors = min(lim->max_sectors,
+               max_integrity_io_size(lim) >> SECTOR_SHIFT);
        return 0;
  }
  
diff --cc block/ioctl.c
Simple merge
Simple merge
Simple merge
index e0c601128efaac75c0b1d53b0247e3442efe5937,c2250172de4c66f17bd81553bb51c83aa1b3d6f6..2c715df63f23f4d3735c4130e5707d855ebb576e
@@@ -1343,13 -1299,17 +1298,17 @@@ static void ublk_dispatch_req(struct ub
        if (!ublk_start_io(ubq, req, io))
                return;
  
-       if (ublk_prep_auto_buf_reg(ubq, req, io, issue_flags))
+       if (ublk_support_auto_buf_reg(ubq) && ublk_rq_has_data(req)) {
+               ublk_do_auto_buf_reg(ubq, req, io, io->cmd, issue_flags);
+       } else {
+               ublk_init_req_ref(ubq, io);
                ublk_complete_io_cmd(io, req, UBLK_IO_RES_OK, issue_flags);
+       }
  }
  
 -static void ublk_cmd_tw_cb(struct io_uring_cmd *cmd,
 -                         unsigned int issue_flags)
 +static void ublk_cmd_tw_cb(struct io_tw_req tw_req, io_tw_token_t tw)
  {
 +      struct io_uring_cmd *cmd = io_uring_cmd_from_tw(tw_req);
        struct ublk_uring_cmd_pdu *pdu = ublk_get_uring_cmd_pdu(cmd);
        struct ublk_queue *ubq = pdu->ubq;
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 8dde444596f1af36e19f2cfe44a8be3ef848d77e,d121768dbccb1b1b29b969b42c59a5fc28b8db4d..98f65d99b77688d0ac01d64f766ad85ed8c1c303
@@@ -1235,35 -1245,12 +1235,35 @@@ xfs_mount_zones
                return -ENOMEM;
  
        xfs_info(mp, "%u zones of %u blocks (%u max open zones)",
 -               mp->m_sb.sb_rgcount, mp->m_groups[XG_TYPE_RTG].blocks,
 -               mp->m_max_open_zones);
 +               mp->m_sb.sb_rgcount, zone_blocks, mp->m_max_open_zones);
        trace_xfs_zones_mount(mp);
  
 +      /*
 +       * The writeback code switches between inodes regularly to provide
 +       * fairness.  The default lower bound is 4MiB, but for zoned file
 +       * systems we want to increase that both to reduce seeks, but also more
 +       * importantly so that workloads that writes files in a multiple of the
 +       * zone size do not get fragmented and require garbage collection when
 +       * they shouldn't.  Increase is to the zone size capped by the max
 +       * extent len.
 +       *
 +       * Note that because s_min_writeback_pages is a superblock field, this
 +       * value also get applied to non-zoned files on the data device if
 +       * there are any.  On typical zoned setup all data is on the RT device
 +       * because using the more efficient sequential write required zones
 +       * is the reason for using the zone allocator, and either the RT device
 +       * and the (meta)data device are on the same block device, or the
 +       * (meta)data device is on a fast SSD while the data on the RT device
 +       * is on a SMR HDD.  In any combination of the above cases enforcing
 +       * the higher min_writeback_pages for non-RT inodes is either a noop
 +       * or beneficial.
 +       */
 +      mp->m_super->s_min_writeback_pages =
 +              XFS_FSB_TO_B(mp, min(zone_blocks, XFS_MAX_BMBT_EXTLEN)) >>
 +                      PAGE_SHIFT;
 +
        if (bdev_is_zoned(bt->bt_bdev)) {
-               error = blkdev_report_zones(bt->bt_bdev,
+               error = blkdev_report_zones_cached(bt->bt_bdev,
                                XFS_FSB_TO_BB(mp, mp->m_sb.sb_rtstart),
                                mp->m_sb.sb_rgcount, xfs_get_zone_info_cb, &iz);
                if (error < 0)
Simple merge
Simple merge