[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6191575-8fd8-9f46-081a-6dddd44818c1@huaweicloud.com>
Date: Wed, 2 Jul 2025 17:33:21 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: John Garry <john.g.garry@...cle.com>, agk@...hat.com, snitzer@...nel.org,
mpatocka@...hat.com, song@...nel.org, 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,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v2 2/5] md/raid0: set chunk_sectors limit
在 2025/06/18 16:37, John Garry 写道:
> 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(+)
>
Sorry about the delay.
Reviewed-by: Yu Kuai <yukuai3@...wei.com>
> 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)
>
Powered by blists - more mailing lists