aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-01-03 21:21:11 -0700
committerJens Axboe <axboe@kernel.dk>2022-01-03 21:21:11 -0700
commit26bc4f019c105234639068703186c01efcabe91e (patch)
tree580aee6ca623346239428577ed4ea7ff9785852d /drivers/md
parentRevert "block: reduce kblockd_mod_delayed_work_on() CPU consumption" (diff)
parentmd/raid1: fix missing bitmap update w/o WriteMostly devices (diff)
downloadlinux-dev-26bc4f019c105234639068703186c01efcabe91e.tar.xz
linux-dev-26bc4f019c105234639068703186c01efcabe91e.zip
Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.16
Pull MD fix from Song, fixing a raid1 regression with missing bitmap updates. * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid1: fix missing bitmap update w/o WriteMostly devices
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 7dc8026cf6ee..85505424f7a4 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1496,12 +1496,13 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
if (!r1_bio->bios[i])
continue;
- if (first_clone && test_bit(WriteMostly, &rdev->flags)) {
+ if (first_clone) {
/* do behind I/O ?
* Not if there are too many, or cannot
* allocate memory, or a reader on WriteMostly
* is waiting for behind writes to flush */
if (bitmap &&
+ test_bit(WriteMostly, &rdev->flags) &&
(atomic_read(&bitmap->behind_writes)
< mddev->bitmap_info.max_write_behind) &&
!waitqueue_active(&bitmap->behind_wait)) {