Re: [PATCH v4 4/7] md/raid10: remove unnecessary barrier around bio_submit_split_bioset()

"yu kuai" <[email protected]>
Newsgroups gmane.linux.raid,gmane.linux.kernel
Message-ID <[email protected]>
在 2026/7/10 18:15, Abd-Alrhman Masalkhi 写道:

> raid10_write_request() drops the barrier before calling
> bio_submit_split_bioset() and reacquires it afterwards. This is no
> longer necessary because the split bio cannot re-enter
> raid10_write_request() while the barrier is held.
>
> The allow_barrier()/wait_barrier() pair was introduced by commit
> e820d55cb99d ("md: fix raid10 hang issue caused by barrier") when
> submit_flushes() called md_handle_request() directly, allowing re-entry
> into raid10_write_request(). Since v5.2, submit_flushes() has instead
> gone through submit_bio(), eliminating that recursion. submit_flushes()
> was later removed entirely by commit b75197e86e6d ("md: Remove flush
> handling").
>
> Currently, raid10_write_request() is only entered from the bio
> submission path, so the split bio submitted by bio_submit_split_bioset()
> cannot recurse back into wait_barrier().
>
> Remove the redundant allow_barrier()/wait_barrier() pair around
> bio_submit_split_bioset().
>
> Signed-off-by: Abd-Alrhman Masalkhi<[email protected]>
> ---
> Changes in v4:
>   - No changes.
>   - Link to v3:https://lore.kernel.org/linux-raid/[email protected]/
>
> Changes in v3:
>   - No changes.
>   - Link to v2:https://lore.kernel.org/linux-raid/[email protected]/
>
> Changes in v2:
>   - Expand the commit message to explain why the
>     allow_barrier()/wait_barrier() pair is no longer needed.
>   - Link to v1:https://lore.kernel.org/linux-raid/[email protected]/
> ---
>   drivers/md/raid10.c | 2 --
>   1 file changed, 2 deletions(-)
Reviewed-by: Yu Kuai <[email protected]>

-- 
Thanks,
Kuai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.