Commit e1b1d03c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-6.18/block-20250929' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull block updates from Jens Axboe:

 - NVMe pull request via Keith:
     - FC target fixes (Daniel)
     - Authentication fixes and updates (Martin, Chris)
     - Admin controller handling (Kamaljit)
     - Target lockdep assertions (Max)
     - Keep-alive updates for discovery (Alastair)
     - Suspend quirk (Georg)

 - MD pull request via Yu:
     - Add support for a lockless bitmap.

       A key feature for the new bitmap are that the IO fastpath is
       lockless. If a user issues lots of write IO to the same bitmap
       bit in a short time, only the first write has additional overhead
       to update bitmap bit, no additional overhead for the following
       writes.

       By supporting only resync or recover written data, means in the
       case creating new array or replacing with a new disk, there is no
       need to do a full disk resync/recovery.

 - Switch ->getgeo() and ->bios_param() to using struct gendisk rather
   than struct block_device.

 - Rust block changes via Andreas. This series adds configuration via
   configfs and remote completion to the rnull driver. The series also
   includes a set of changes to the rust block device driver API: a few
   cleanup patches, and a few features supporting the rnull changes.

   The series removes the raw buffer formatting logic from
   `kernel::block` and improves the logic available in `kernel::string`
   to support the same use as the removed logic.

 - floppy arch cleanups

 - Reduce the number of dereferencing needed for ublk commands

 - Restrict supported sockets for nbd. Mostly done to eliminate a class
   of issues perpetually reported by syzbot, by using nonsensical socket
   setups.

 - A few s390 dasd block fixes

 - Fix a few issues around atomic writes

 - Improve DMA interation for integrity requests

 - Improve how iovecs are treated with regards to O_DIRECT aligment
   constraints.

   We used to require each segment to adhere to the constraints, now
   only the request as a whole needs to.

 - Clean up and improve p2p support, enabling use of p2p for metadata
   payloads

 - Improve locking of request lookup, using SRCU where appropriate

 - Use page references properly for brd, avoiding very long RCU sections

 - Fix ordering of recursively submitted IOs

 - Clean up and improve updating nr_requests for a live device

 - Various fixes and cleanups

* tag 'for-6.18/block-20250929' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (164 commits)
  s390/dasd: enforce dma_alignment to ensure proper buffer validation
  s390/dasd: Return BLK_STS_INVAL for EINVAL from do_dasd_request
  ublk: remove redundant zone op check in ublk_setup_iod()
  nvme: Use non zero KATO for persistent discovery connections
  nvmet: add safety check for subsys lock
  nvme-core: use nvme_is_io_ctrl() for I/O controller check
  nvme-core: do ioccsz/iorcsz validation only for I/O controllers
  nvme-core: add method to check for an I/O controller
  blk-cgroup: fix possible deadlock while configuring policy
  blk-mq: fix null-ptr-deref in blk_mq_free_tags() from error path
  blk-mq: Fix more tag iteration function documentation
  selftests: ublk: fix behavior when fio is not installed
  ublk: don't access ublk_queue in ublk_unmap_io()
  ublk: pass ublk_io to __ublk_complete_rq()
  ublk: don't access ublk_queue in ublk_need_complete_req()
  ublk: don't access ublk_queue in ublk_check_commit_and_fetch()
  ublk: don't pass ublk_queue to ublk_fetch()
  ublk: don't access ublk_queue in ublk_config_io_buf()
  ublk: don't access ublk_queue in ublk_check_fetch_buf()
  ublk: pass q_id and tag to __ublk_check_and_get_req()
  ...
parents 5832d264 130e6de6
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -603,16 +603,10 @@ Date: July 2003
Contact:	linux-block@vger.kernel.org
Description:
		[RW] This controls how many requests may be allocated in the
		block layer for read or write requests. Note that the total
		allocated number may be twice this amount, since it applies only
		to reads or writes (not the accumulated sum).

		To avoid priority inversion through request starvation, a
		request queue maintains a separate request pool per each cgroup
		when CONFIG_BLK_CGROUP is enabled, and this parameter applies to
		each such per-block-cgroup request pool.  IOW, if there are N
		block cgroups, each request queue may have up to N request
		pools, each independently regulated by nr_requests.
		block layer. Noted this value only represents the quantity for a
		single blk_mq_tags instance. The actual number for the entire
		device depends on the hardware queue count, whether elevator is
		enabled, and whether tags are shared.


What:		/sys/block/<disk>/queue/nr_zones
+61 −25
Original line number Diff line number Diff line
@@ -347,6 +347,54 @@ All md devices contain:
     active-idle
         like active, but no writes have been seen for a while (safe_mode_delay).

  consistency_policy
     This indicates how the array maintains consistency in case of unexpected
     shutdown. It can be:

     none
       Array has no redundancy information, e.g. raid0, linear.

     resync
       Full resync is performed and all redundancy is regenerated when the
       array is started after unclean shutdown.

     bitmap
       Resync assisted by a write-intent bitmap.

     journal
       For raid4/5/6, journal device is used to log transactions and replay
       after unclean shutdown.

     ppl
       For raid5 only, Partial Parity Log is used to close the write hole and
       eliminate resync.

     The accepted values when writing to this file are ``ppl`` and ``resync``,
     used to enable and disable PPL.

  uuid
     This indicates the UUID of the array in the following format:
     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

  bitmap_type
     [RW] When read, this file will display the current and available
     bitmap for this array. The currently active bitmap will be enclosed
     in [] brackets. Writing an bitmap name or ID to this file will switch
     control of this array to that new bitmap. Note that writing a new
     bitmap for created array is forbidden.

     none
         No bitmap
     bitmap
         The default internal bitmap
     llbitmap
         The lockless internal bitmap

If bitmap_type is not none, then additional bitmap attributes bitmap/xxx or
llbitmap/xxx will be created after md device KOBJ_CHANGE event.

If bitmap_type is bitmap, then the md device will also contain:

  bitmap/location
     This indicates where the write-intent bitmap for the array is
     stored.
@@ -401,35 +449,23 @@ All md devices contain:
     once the array becomes non-degraded, and this fact has been
     recorded in the metadata.

  consistency_policy
     This indicates how the array maintains consistency in case of unexpected
     shutdown. It can be:

     none
       Array has no redundancy information, e.g. raid0, linear.

     resync
       Full resync is performed and all redundancy is regenerated when the
       array is started after unclean shutdown.

     bitmap
       Resync assisted by a write-intent bitmap.
If bitmap_type is llbitmap, then the md device will also contain:

     journal
       For raid4/5/6, journal device is used to log transactions and replay
       after unclean shutdown.
  llbitmap/bits
     This is read-only, show status of bitmap bits, the number of each
     value.

     ppl
       For raid5 only, Partial Parity Log is used to close the write hole and
       eliminate resync.

     The accepted values when writing to this file are ``ppl`` and ``resync``,
     used to enable and disable PPL.
  llbitmap/metadata
     This is read-only, show bitmap metadata, include chunksize, chunkshift,
     chunks, offset and daemon_sleep.

  uuid
     This indicates the UUID of the array in the following format:
     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  llbitmap/daemon_sleep
     This is read-write, time in seconds that daemon function will be
     triggered to clear dirty bits.

  llbitmap/barrier_idle
     This is read-write, time in seconds that page barrier will be idled,
     means dirty bits in the page will be cleared.

As component devices are added to an md array, they appear in the ``md``
directory as new directories named::
+1 −1
Original line number Diff line number Diff line
@@ -443,7 +443,7 @@ prototypes::
	int (*direct_access) (struct block_device *, sector_t, void **,
				unsigned long *);
	void (*unlock_native_capacity) (struct gendisk *);
	int (*getgeo)(struct block_device *, struct hd_geometry *);
	int (*getgeo)(struct gendisk *, struct hd_geometry *);
	void (*swap_slot_free_notify) (struct block_device *, unsigned long);

locking rules:
+4 −4
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ Details::

    /**
    * scsi_bios_ptable - return copy of block device's partition table
    * @dev:        pointer to block device
    * @dev:        pointer to gendisk
    *
    *      Returns pointer to partition table, or NULL for failure
    *
@@ -390,7 +390,7 @@ Details::
    *
    *      Defined in: drivers/scsi/scsicam.c
    **/
    unsigned char *scsi_bios_ptable(struct block_device *dev)
    unsigned char *scsi_bios_ptable(struct gendisk *dev)


    /**
@@ -623,7 +623,7 @@ Details::
    *      bios_param - fetch head, sector, cylinder info for a disk
    *      @sdev: pointer to scsi device context (defined in
    *             include/scsi/scsi_device.h)
    *      @bdev: pointer to block device context (defined in fs.h)
    *      @disk: pointer to gendisk (defined in blkdev.h)
    *      @capacity:  device size (in 512 byte sectors)
    *      @params: three element array to place output:
    *              params[0] number of heads (max 255)
@@ -643,7 +643,7 @@ Details::
    *
    *      Optionally defined in: LLD
    **/
	int bios_param(struct scsi_device * sdev, struct block_device *bdev,
	int bios_param(struct scsi_device * sdev, struct gendisk *disk,
		    sector_t capacity, int params[3])


+1 −1
Original line number Diff line number Diff line
@@ -4382,7 +4382,7 @@ W: https://rust-for-linux.com
B:	https://github.com/Rust-for-Linux/linux/issues
C:	https://rust-for-linux.zulipchat.com/#narrow/stream/Block
T:	git https://github.com/Rust-for-Linux/linux.git rust-block-next
F:	drivers/block/rnull.rs
F:	drivers/block/rnull/
F:	rust/kernel/block.rs
F:	rust/kernel/block/
Loading