[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250618083737.4084373-3-john.g.garry@oracle.com>
Date: Wed, 18 Jun 2025 08:37:34 +0000
From: John Garry <john.g.garry@...cle.com>
To: agk@...hat.com, snitzer@...nel.org, mpatocka@...hat.com, song@...nel.org,
yukuai3@...wei.com, hch@....de, nilay@...ux.ibm.com, axboe@...nel.dk
Cc: dm-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, linux-block@...r.kernel.org,
ojaswin@...ux.ibm.com, martin.petersen@...cle.com,
John Garry <john.g.garry@...cle.com>
Subject: [PATCH v2 2/5] md/raid0: set chunk_sectors limit
Currently we use min io size as the chunk size when deciding on the
atomic write size limits - see blk_stack_atomic_writes_head().
The limit min_io size is not a reliable value to store the chunk size, as
this may be mutated by the block stacking code. Such an example would be
for the min io size less than the physical block size, and the min io size
is raised to the physical block size - see blk_stack_limits().
The block stacking limits will rely on chunk_sectors in future,
so set this value (to the chunk size).
Signed-off-by: John Garry <john.g.garry@...cle.com>
---
drivers/md/raid0.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index d8f639f4ae12..cbe2a9054cb9 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -384,6 +384,7 @@ static int raid0_set_limits(struct mddev *mddev)
lim.max_write_zeroes_sectors = mddev->chunk_sectors;
lim.io_min = mddev->chunk_sectors << 9;
lim.io_opt = lim.io_min * mddev->raid_disks;
+ lim.chunk_sectors = mddev->chunk_sectors;
lim.features |= BLK_FEAT_ATOMIC_WRITES;
err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
if (err)
--
2.31.1
Powered by blists - more mailing lists