From: Kanchan Joshi <joshi.k@samsung.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: brauner@kernel.org, hch@lst.de, dgc@kernel.org, jack@suse.cz,
cem@kernel.org, axboe@kernel.dk, kbusch@kernel.org,
ritesh.list@gmail.com, linux-xfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
gost.dev@samsung.com
Subject: Re: [PATCH v3 2/6] iomap: introduce and propagate write_stream
Date: Thu, 16 Jul 2026 17:57:26 +0530 [thread overview]
Message-ID: <9cb5024f-7e39-4b02-8720-fb4a76affa60@samsung.com> (raw)
In-Reply-To: <20260624181044.GW6078@frogsfrogsfrogs>
On 6/24/2026 11:40 PM, Darrick J. Wong wrote:
>> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
>> index b36ee619cdcd..455fd5d97d25 100644
>> --- a/fs/iomap/direct-io.c
>> +++ b/fs/iomap/direct-io.c
>> @@ -348,6 +348,7 @@ static ssize_t iomap_dio_bio_iter_one(struct iomap_iter *iter,
>> fscrypt_set_bio_crypt_ctx(bio, iter->inode, pos, GFP_KERNEL);
>> bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos);
>> bio->bi_write_hint = iter->inode->i_write_hint;
>> + bio->bi_write_stream = iter->iomap.write_stream;
>> bio->bi_ioprio = dio->iocb->ki_ioprio;
>> bio->bi_private = dio;
>> bio->bi_end_io = iomap_dio_bio_end_io;
>> diff --git a/fs/iomap/ioend.c b/fs/iomap/ioend.c
>> index acf3cf98b23a..56ed5ba6a421 100644
>> --- a/fs/iomap/ioend.c
>> +++ b/fs/iomap/ioend.c
>> @@ -164,6 +164,7 @@ static struct iomap_ioend *iomap_alloc_ioend(struct iomap_writepage_ctx *wpc,
>> GFP_NOFS, &iomap_ioend_bioset);
>> bio->bi_iter.bi_sector = iomap_sector(&wpc->iomap, pos);
>> bio->bi_write_hint = wpc->inode->i_write_hint;
>> + bio->bi_write_stream = wpc->iomap.write_stream;
>> wbc_init_bio(wpc->wbc, bio);
>> wpc->nr_folios = 0;
>> return iomap_init_ioend(wpc->inode, bio, pos, ioend_flags);
>> @@ -187,6 +188,8 @@ static bool iomap_can_add_to_ioend(struct iomap_writepage_ctx *wpc, loff_t pos,
>> if (!(wpc->iomap.flags & IOMAP_F_ANON_WRITE) &&
>> iomap_sector(&wpc->iomap, pos) != bio_end_sector(&ioend->io_bio))
>> return false;
>> + if (wpc->iomap.write_stream != ioend->io_bio.bi_write_stream)
>> + return false;
>> /*
>> * Limit ioend bio chain lengths to minimise IO completion latency. This
>> * also prevents long tight loops ending page writeback on all the
>> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
>> index 2c5685adf3a9..44583429ffa4 100644
>> --- a/include/linux/iomap.h
>> +++ b/include/linux/iomap.h
>> @@ -120,6 +120,8 @@ struct iomap {
>> u64 length; /* length of mapping, bytes */
>> u16 type; /* type of mapping */
>> u16 flags; /* flags for mapping */
>> + u8 write_stream; /* write stream for I/O */
> I'm mildly confused by the types here -- the ioctl exposes a u32, iomap
> has a u8, and xfs seems to use u16. I gather you want maximum
> flexibility in the uapi and that's the reason for the u32, but can the
> internal interfaces be made consistent?
Yes, using u16 within iomap will make it better.
> I also wonder what happens if the write stream ever becomes persistent,
> but this patchset doesn't go there, and maybe the programming model is
> simply that you have to set it every time you open the file?
Right, not trying to make things persistent.
next prev parent reply other threads:[~2026-07-16 12:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260616181240epcas5p3f86fbb67f0d04cb0ee4b34839c9522b5@epcas5p3.samsung.com>
2026-06-16 18:05 ` [PATCH v3 0/6] xfs write streams Kanchan Joshi
2026-06-16 18:05 ` [PATCH v3 1/6] fs: add generic write-stream management ioctl Kanchan Joshi
2026-06-24 18:03 ` Darrick J. Wong
2026-06-16 18:05 ` [PATCH v3 2/6] iomap: introduce and propagate write_stream Kanchan Joshi
2026-06-24 18:10 ` Darrick J. Wong
2026-07-16 12:27 ` Kanchan Joshi [this message]
2026-06-16 18:05 ` [PATCH v3 3/6] xfs: implement write-stream management support Kanchan Joshi
2026-06-24 18:11 ` Darrick J. Wong
2026-06-16 18:05 ` [PATCH v3 4/6] xfs: generic AG set based steering Kanchan Joshi
2026-06-16 18:05 ` [PATCH v3 5/6] xfs: write stream based AG placement Kanchan Joshi
2026-06-16 18:05 ` [PATCH v3 6/6] xfs: introduce software write streams Kanchan Joshi
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=9cb5024f-7e39-4b02-8720-fb4a76affa60@samsung.com \
--to=joshi.k@samsung.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=dgc@kernel.org \
--cc=djwong@kernel.org \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ritesh.list@gmail.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