Thread (3 messages) flat view 3 messages, 1 author, 2d ago
WARM2d

[PATCH 0/2] block: write streams on partitions

From: Keoseong Park <hidden>
Date: 2026-09-11 06:45:38
Also in: lkml

bdev_max_write_streams() returns 0 for any partition, so nothing on top
of a partition can use write streams today.

A partition already gets its own view of the device: the file system
sees sectors from 0 and blk_partition_remap() turns them into disk
sectors. The first patch does the same for write streams. A partition
gets a subset of the disk's streams and exposes them as its streams 1 to
N, so a file system on a partition needs no change, and the remap
translates them to the streams reserved for that partition - two
partitions can both write with stream 1 without sharing a stream on the
device. The idea comes from an earlier patch by Christoph [1].

The second patch adds /sys/block/<disk>/<partition>/write_streams.
Writing N reserves N of the disk's streams for the partition, writing 0
gives them back, and the IDs come from a per-disk bitmap so that two
partitions never share one. The count can only be changed while the
partition is not open, the same rule as for a partition table change.
Shrinking releases only the tail, so the streams a partition keeps map to
the same device streams as before.
The feature is opt-in: unless a partition's write_streams is set,
partition I/O behaves exactly as before.

[1] https://lore.kernel.org/all/20241119121632.1225556-16-hch@lst.de/ (local)

Keoseong Park (2):
  block: allow write streams on partitions
  block: add a sysfs interface to reserve write streams for a partition

 Documentation/ABI/stable/sysfs-block |  19 ++++
 block/bdev.c                         |   1 +
 block/blk-core.c                     |  10 ++-
 block/partitions/core.c              | 128 +++++++++++++++++++++++++++
 include/linux/blk_types.h            |   3 +
 include/linux/blkdev.h               |   4 +-
 6 files changed, 163 insertions(+), 2 deletions(-)

-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help