diff mbox series

[V2,1/2] md: bypass block throttle for superblock update

Message ID 20231107212412.51470-1-junxiao.bi@oracle.com (mailing list archive)
State Superseded, archived
Headers show
Series [V2,1/2] md: bypass block throttle for superblock update | expand

Commit Message

Junxiao Bi Nov. 7, 2023, 9:24 p.m. UTC
commit 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
introduced a hung bug and will be reverted in next patch, since the issue
that commit is fixing is due to md superblock write is throttled by wbt,
to fix it, we can have superblock write bypass block layer throttle.

Fixes: 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
Suggested-by: Yu Kuai <yukuai1@huaweicloud.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
---
 v2 <- v1:
 - swap the order of the patch
 - small tweak of the patch log

 drivers/md/md.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Yu Kuai Nov. 8, 2023, 1:04 a.m. UTC | #1
在 2023/11/08 5:24, Junxiao Bi 写道:
> commit 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
> introduced a hung bug and will be reverted in next patch, since the issue
> that commit is fixing is due to md superblock write is throttled by wbt,
> to fix it, we can have superblock write bypass block layer throttle.
> 
> Fixes: 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
> Suggested-by: Yu Kuai <yukuai1@huaweicloud.com>
Plese use this address, yukuai3@huawei.com
> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
> ---

LGTM
Reviewed-by: Yu Kuai <yukuai3@huawei.com>

Thanks
>   v2 <- v1:
>   - swap the order of the patch
>   - small tweak of the patch log
> 
>   drivers/md/md.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 4ee4593c874a..7a5a22097365 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -1013,9 +1013,10 @@ void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
>   		return;
>   
>   	bio = bio_alloc_bioset(rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev,
> -			       1,
> -			       REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH | REQ_FUA,
> -			       GFP_NOIO, &mddev->sync_set);
> +			      1,
> +			      REQ_OP_WRITE | REQ_SYNC | REQ_IDLE | REQ_META
> +				  | REQ_PREFLUSH | REQ_FUA,
> +			      GFP_NOIO, &mddev->sync_set);
>   
>   	atomic_inc(&rdev->nr_pending);
>   
>
diff mbox series

Patch

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4ee4593c874a..7a5a22097365 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1013,9 +1013,10 @@  void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
 		return;
 
 	bio = bio_alloc_bioset(rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev,
-			       1,
-			       REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH | REQ_FUA,
-			       GFP_NOIO, &mddev->sync_set);
+			      1,
+			      REQ_OP_WRITE | REQ_SYNC | REQ_IDLE | REQ_META
+				  | REQ_PREFLUSH | REQ_FUA,
+			      GFP_NOIO, &mddev->sync_set);
 
 	atomic_inc(&rdev->nr_pending);