Linux filesystem development
 help / color / mirror / Atom feed
* [PATCH] iomap: prevent ioend merge when io_private differs
@ 2026-07-13  7:42 Zhang Yi
  2026-07-13  8:44 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Yi @ 2026-07-13  7:42 UTC (permalink / raw)
  To: linux-fsdevel, linux-xfs
  Cc: linux-ext4, brauner, djwong, hch, joannelkoong, yi.zhang,
	yi.zhang, yizhang089, chengzhihao1, yangerkun, yukuai

From: Zhang Yi <yi.zhang@huawei.com>

Different io_private values indicate distinct completion contexts that
must not be merged together, as this could leak or corrupt the private
data associated with each ioend.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
---
This is one more change for the ext4 conversion.
Disscussion Link:
 https://lore.kernel.org/linux-ext4/81f4c0ec-1d80-4987-b31e-4e9ecd394c63@huaweicloud.com/

 fs/iomap/ioend.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/iomap/ioend.c b/fs/iomap/ioend.c
index acf3cf98b23a..ba59570c0926 100644
--- a/fs/iomap/ioend.c
+++ b/fs/iomap/ioend.c
@@ -380,6 +380,8 @@ static bool iomap_ioend_can_merge(struct iomap_ioend *ioend,
 
 	if (ioend->io_bio.bi_status != next->io_bio.bi_status)
 		return false;
+	if (ioend->io_private != next->io_private)
+		return false;
 	if (next->io_flags & IOMAP_IOEND_BOUNDARY)
 		return false;
 	if ((ioend->io_flags & IOMAP_IOEND_NOMERGE_FLAGS) !=
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iomap: prevent ioend merge when io_private differs
  2026-07-13  7:42 [PATCH] iomap: prevent ioend merge when io_private differs Zhang Yi
@ 2026-07-13  8:44 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2026-07-13  8:44 UTC (permalink / raw)
  To: Zhang Yi
  Cc: linux-fsdevel, linux-xfs, linux-ext4, brauner, djwong, hch,
	joannelkoong, yi.zhang, yizhang089, chengzhihao1, yangerkun,
	yukuai

On Mon, Jul 13, 2026 at 03:42:06PM +0800, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
> 
> Different io_private values indicate distinct completion contexts that
> must not be merged together, as this could leak or corrupt the private
> data associated with each ioend.

Looks sensible and fine to queue up now:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-13  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13  7:42 [PATCH] iomap: prevent ioend merge when io_private differs Zhang Yi
2026-07-13  8:44 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox