Hi,
在 2025/08/18 16:14, Christoph Hellwig 写道:
On Mon, Aug 18, 2025 at 04:10:32PM +0800, Yu Kuai wrote:
Why? We just set the flag for mdraid disks first, and then inherit to
top devices that is stacked by mdraid, so md raid limits should always
be relevant. I still don't understand the problem that you said :(
The point is the fact how mdraid calculates the opt_io is somewhere
between ireelevant and wrong for any layer above. The layers above
just care about the value. And to calculate the value you don't
need a special flag. mdraid can simply override io_opt (or better
max_hw_sectors) after stacking the lower level devices with a few
lines of code (and hopefully a good comment).
Ok, let's ignore the case there are other drivers in the stack chains,
just in this case: mdraid on the top of another mdraid, which we already
have. And in order not to introduce regression, we can do this inside
mdraid.
Thanks,
Kuai
.