Skip to content

Commit 26bc4f0

Browse files
committed
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
2 parents 87959fa + 46669e8 commit 26bc4f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/md/raid1.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,12 +1496,13 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
14961496
if (!r1_bio->bios[i])
14971497
continue;
14981498

1499-
if (first_clone && test_bit(WriteMostly, &rdev->flags)) {
1499+
if (first_clone) {
15001500
/* do behind I/O ?
15011501
* Not if there are too many, or cannot
15021502
* allocate memory, or a reader on WriteMostly
15031503
* is waiting for behind writes to flush */
15041504
if (bitmap &&
1505+
test_bit(WriteMostly, &rdev->flags) &&
15051506
(atomic_read(&bitmap->behind_writes)
15061507
< mddev->bitmap_info.max_write_behind) &&
15071508
!waitqueue_active(&bitmap->behind_wait)) {

0 commit comments

Comments
 (0)