Re: [PATCH -next v3 6/7] md/raid1-10: don't handle pluged bio by daemon thread

From: Paul Menzel
Date: Wed May 31 2023 - 03:59:44 EST

Dear Yu,

Thank you for your patch. Some minor nits in case you should resend this.

In the summary/title it should be plug*g*ed.

Am 29.05.23 um 15:11 schrieb Yu Kuai:
From: Yu Kuai <yukuai3@xxxxxxxxxx>

current->bio_list will be set under submit_bio() context, in this case
bitmap io will be added to the list and wait for current io submission to

1. I’d use present tense: s/will be set/is set/; s/will be added/is added/
2. wait*s*

finish, while current io submission must wait for bitmap io to be done.
commit 874807a83139 ("md/raid1{,0}: fix deadlock in bitmap_unplug.") fix
the deadlock by handling plugged bio by daemon thread.

On the one hand, the deadlock won't exist after commit a214b949d8e3
("blk-mq: only flush requests from the plug in blk_mq_submit_bio"). On
the other hand, current solution makes it impossible to flush plugged bio
in raid1/10_make_request(), because this will cause that all the writes
will goto daemon thread.

s/goto/go to/

Kind regards,


In order to limit the number of plugged bio, commit 874807a83139
("md/raid1{,0}: fix deadlock in bitmap_unplug.") is reverted, and the
deadlock is fixed by handling bitmap io asynchronously.

Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
drivers/md/raid1-10.c | 14 ++++++++++++++
drivers/md/raid1.c | 4 ++--
drivers/md/raid10.c | 8 +++-----
3 files changed, 19 insertions(+), 7 deletions(-)