Skip to content

Commit

Permalink
Merge tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block
Browse files Browse the repository at this point in the history
Pull block fix from Jens Axboe:
 "Just the md bitmap regression this time"

* tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block:
  md/raid1: fix missing bitmap update w/o WriteMostly devices
  • Loading branch information
Linus Torvalds committed Jan 7, 2022
2 parents 494603e + 26bc4f0 commit 35632d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 35632d9

Please sign in to comment.