[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <060396d7-797e-b876-9945-1dc9c8cbf2b4@huaweicloud.com>
Date: Thu, 21 Aug 2025 17:37:15 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Christoph Hellwig <hch@...radead.org>, Yu Kuai <yukuai1@...weicloud.com>
Cc: axboe@...nel.dk, neil@...wn.name, akpm@...ux-foundation.org,
linux-block@...r.kernel.org, linux-raid@...r.kernel.org,
linux-kernel@...r.kernel.org, colyli@...nel.org, xni@...hat.com,
yi.zhang@...wei.com, yangerkun@...wei.com, johnny.chenyi@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>, tieren@...as.com
Subject: Re: [PATCH] block: fix disordered IO in the case recursive split
Hi,
在 2025/08/21 17:02, Christoph Hellwig 写道:
> On Thu, Aug 21, 2025 at 04:56:33PM +0800, Yu Kuai wrote:
>> Can you give some examples as how to chain the right way?
>
> fs/xfs/xfs_bio_io.c: xfs_rw_bdev
Just take a look, this is
old bio->new bio
while bio split is:
new_bio->old bio
So xfs_rw_bdev won't flag old bio as BIO_CHAIN, while old bio will still
be resubmitted to current->bio_list, hence this patch won't break this
case, right?
I'll take look at all the bio_chain() callers other than split case to
make sure.
> fs/xfs/xfs_buf.c: xfs_buf_submit_bio
This is a little different, new bio -> old bio, while new bio is
resubmitted, the new bio still don't have flag BIO_CHAIN, so this is not
affected by this patch.
> fs/xfs/xfs_log.c: xlog_write_iclog
This is the same as above.
>
>> BTW, for all
>> the io split case, should this order be fixed? I feel we should, this
>> disorder can happen on any stack case, where top max_sector is greater
>> than stacked disk.
>
> Yes, I've been trying get Bart to fix this for a while instead of
> putting in a workaround very similar to the one proposed here,
> but so far nothing happened.
>
Do you mean this thread?
Fix bio splitting by the crypto fallback code
I'll take look at all the callers of bio_chain(), in theory, we'll have
different use cases like:
1) chain old -> new, or chain new -> old
2) put old or new to current->bio_list, currently always in the tail,
we might want a new case to the head;
Perhaps it'll make sense to add high level helpers to do the chain
and resubmit and convert all callers to use new helpers, want do you
think?
Thanks,
Kuai
> .
>
Powered by blists - more mailing lists