On 7/29/25 12:56, Yu Kuai wrote: > Hi, > > 在 2025/7/30 0:12, Tony Battersby 写道: >> md-raid currently sets io_min and io_opt to the RAID chunk and stripe >> sizes and then calls queue_limits_stack_bdev() to combine the io_min and >> io_opt values with those of the component devices. The io_opt size is >> notably combined using the least common multiple (lcm), which does not >> work well in practice for some drives (1), resulting in overflow or >> unreasonable values. >> >> dm-raid, on the other hand, sets io_min and io_opt through the >> raid_io_hints() function, which is called after stacking all the queue >> limits of the component drives, so the RAID chunk and stripe sizes >> override the values of the stacking. >> >> Change md-raid to be more like dm-raid by setting io_min and io_opt to >> the RAID chunk and stripe sizes after stacking the queue limits of the >> component devies. This fixes /sys/block/md0/queue/optimal_io_size from >> being a bogus value like 3221127168 to being the correct RAID stripe >> size. > This is already discussed, and mtp3sas should fix this strange value. Thanks, I will follow that ongoing discussion. https://lore.kernel.org/all/ywsfp3lqnijgig6yrlv2ztxram6ohf5z4yfeebswjkvp2dzisd@f5ikoyo3sfq5/