Hi,
在 2025/7/16 20:23, Coly Li 写道:
2025年7月16日 20:17,Christoph Hellwig <hch@xxxxxx> 写道:
On Wed, Jul 16, 2025 at 08:16:34PM +0800, Coly Li wrote:
2025年7月16日 20:14,Christoph Hellwig <hch@xxxxxx> 写道:
On Wed, Jul 16, 2025 at 08:10:33PM +0800, Coly Li wrote:
Just like hanlding discard requests, handling raid5 read/write bios should
try to split the large bio into opt_io_size aligned both *offset* and
*length*. If I understand correctly, bio_split_to_limits() doesn't handle
offset alignment for read5 read/write bios.
Well, if you want offset alignment, set chunk_sectors.
Do you mean setting max_hw_sectors as chunk_sectors?
Setting both to the desired value (full stipe width).
Do you mean setting chunk_size as (chunk_size * data_disks)? This is deadlock…
If opt_io_size is (chunk_size * data_disks), setting new max_hw_sectors as rounddown(current max_hw_sectors, opt_io_size) is good idea.
I think round down max_hw_sectors to io_opt(chunk_size * data_disks)
will really
make things much easier, perhaps Christoph means this way. All you need
to do is to
handle not aligned bio and split that part, and for aligned bio fall
back to use
bio_split_to_limits().
Thanks,
Kuai
Thanks.
Coly Li