Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb45185d authored by Philipp Reisner's avatar Philipp Reisner Committed by Jens Axboe
Browse files

drbd: fix spurious warning about bitmap being locked from detach



Introduced in drbd: always write bitmap on detach,
the bitmap bulk writeout on detach was indicating
it expected exclusive bitmap access.

Where I meant to say: expect no more modifications,
but testing/counting is still allowed.

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0b2dafcd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3412,8 +3412,12 @@ static int w_go_diskless(struct drbd_work *w, int unused)
	 * end up here after a failed attach, before ldev was even assigned.
	 */
	if (mdev->bitmap && mdev->ldev) {
		/* An interrupted resync or similar is allowed to recounts bits
		 * while we detach.
		 * Any modifications would not be expected anymore, though.
		 */
		if (drbd_bitmap_io_from_worker(mdev, drbd_bm_write,
					"detach", BM_LOCKED_MASK)) {
					"detach", BM_LOCKED_TEST_ALLOWED)) {
			if (test_bit(WAS_READ_ERROR, &mdev->flags)) {
				drbd_md_set_flag(mdev, MDF_FULL_SYNC);
				drbd_md_sync(mdev);