mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keoseong Park <keosung.park@samsung.com>
To: "axboe@kernel.dk" <axboe@kernel.dk>, "hch@lst.de" <hch@lst.de>,
	"kbusch@kernel.org" <kbusch@kernel.org>,
	"hare@suse.de" <hare@suse.de>,
	Kanchan Joshi <joshi.k@samsung.com>,
	Nitesh Shetty <nj.shetty@samsung.com>
Cc: Jinyoung Choi <j-young.choi@samsung.com>,
	Jeuk Kim <jeuk20.kim@samsung.com>,
	Yunjae Jo <yunjae00.jo@samsung.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	SSDR Gost Dev <gost.dev@samsung.com>
Subject: [PATCH 0/2] block: write streams on partitions
Date: Fri, 11 Sep 2026 15:45:29 +0900	[thread overview]
Message-ID: <20260911064529epcms2p4791af8edd7c24d1a44b24e77c95c3f0b@epcms2p4> (raw)
In-Reply-To: <CGME20260911064529epcms2p4791af8edd7c24d1a44b24e77c95c3f0b@epcms2p4>

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/

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


       reply	other threads:[~2026-09-11  6:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260911064529epcms2p4791af8edd7c24d1a44b24e77c95c3f0b@epcms2p4>
2026-09-11  6:45 ` Keoseong Park [this message]
     [not found]   ` <CGME20260911064529epcms2p4791af8edd7c24d1a44b24e77c95c3f0b@epcms2p7>
2026-09-11  6:47     ` [PATCH 1/2] block: allow " Keoseong Park
     [not found]   ` <CGME20260911064529epcms2p4791af8edd7c24d1a44b24e77c95c3f0b@epcms2p6>
2026-09-11  6:48     ` [PATCH 2/2] block: add a sysfs interface to reserve write streams for a partition Keoseong Park
     [not found] <CGME20261203083228epcms2p2bd8ded692377baa9f3116da00b2d085d@epcms2p2>
2026-12-03  8:32 ` [PATCH 0/2] block: write streams on partitions Keoseong Park
2026-12-03  9:52   ` hch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260911064529epcms2p4791af8edd7c24d1a44b24e77c95c3f0b@epcms2p4 \
    --to=keosung.park@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=gost.dev@samsung.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=j-young.choi@samsung.com \
    --cc=jeuk20.kim@samsung.com \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nj.shetty@samsung.com \
    --cc=yunjae00.jo@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®