[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <177acc30-7f28-547b-225e-167c60434e3f@huaweicloud.com>
Date: Thu, 31 Jul 2025 15:02:10 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: "Martin K. Petersen" <martin.petersen@...cle.com>,
linan666@...weicloud.com
Cc: song@...nel.org, hare@...e.de, axboe@...nel.dk,
linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
bvanassche@....org, hch@...radead.org, filipe.c.maia@...il.com,
yangerkun@...wei.com, yi.zhang@...wei.com, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v2 2/3] md: allow configuring logical_block_size
Hi,
在 2025/07/31 13:36, Martin K. Petersen 写道:
>
>> Simply restricting larger-LBS disks is inflexible. In some scenarios,
>> only disks with 512 LBS are available currently, but later, disks with
>> 4k LBS may be added to the array.
>
> Having to have the foresight to preemptively configure a larger logical
> block size at creation time also seems somewhat inflexible :)
I think the main reason we want to do this is that, for example, if user
create array with 512 lbs disks, and later they may want be able to add
new disk with 4k lbs.
>
> In general I am not a big fan of mixing devices with different
> properties. I have regretted stacking the logical block size on several
> occasions.
>
> I am also concerned about PI breaking if the logical block size facing
> upwards does not match the actual logical block size of the component
> devices below. In theory it should work with the PI interval exponent
> but it is something that needs to be tested.
>
> What if the MD device's configured logical block size is larger than the
> physical block size of the underlying devices? Then we'll end up
> reporting a logical block size larger than the physical block size. Ugh.
I think this is not expected, from blk_validate_limits(), if lbs is
larger than pbs, pbs will be set to lbs, which is called from
queue_limits_commit_update().
>
> Oh, and what about atomics?
Do you mean atomic writes? I didn't check the code yet, however, I think
the atomic_writes stacking code should notice if the high level lbs is
conflict with atomic_writes limits.
Thanks,
Kuai
>
Powered by blists - more mailing lists