Unverified Commit 77e870c2 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15318 md/raid1: fix bitmap update when all write requests fail

parents 3c67b39e 10554bbf
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1551,6 +1551,13 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
		}
	}

	/*
	 * Corresponding to md_bitmap_endwrite() from close_write(), in the case
	 * io range from all member disks are badblocks.
	 */
	if (first_clone)
		md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors, 0);

	r1_bio_write_done(r1_bio);

	/* In case raid1d snuck in to freeze_array */