Skip to content

Commit

Permalink
md: bypass block throttle for superblock update
Browse files Browse the repository at this point in the history
commit 5e2cf33 ("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: 5e2cf33 ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
Cc: stable@vger.kernel.org # v5.19+
Suggested-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231108182216.73611-1-junxiao.bi@oracle.com
  • Loading branch information
biger410 authored and liu-song-6 committed Nov 27, 2023
1 parent 668bfee commit d6e035a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d6e035a

Please sign in to comment.