diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2013-03-27 09:08:39 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-28 12:10:25 -0400 |
commit | bb45185de2e90af63a7bc48855de6f870cc216fc (patch) | |
tree | 6c2d78db55ed259ccfdb2b4002f4bba4a537bca5 /drivers/block/drbd | |
parent | 0b2dafcd9f8fd38d00398dd3da88225ad1e99726 (diff) |
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: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index a150b59897a0..67d2bb3bb533 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -3412,8 +3412,12 @@ static int w_go_diskless(struct drbd_work *w, int unused) | |||
3412 | * end up here after a failed attach, before ldev was even assigned. | 3412 | * end up here after a failed attach, before ldev was even assigned. |
3413 | */ | 3413 | */ |
3414 | if (mdev->bitmap && mdev->ldev) { | 3414 | if (mdev->bitmap && mdev->ldev) { |
3415 | /* An interrupted resync or similar is allowed to recounts bits | ||
3416 | * while we detach. | ||
3417 | * Any modifications would not be expected anymore, though. | ||
3418 | */ | ||
3415 | if (drbd_bitmap_io_from_worker(mdev, drbd_bm_write, | 3419 | if (drbd_bitmap_io_from_worker(mdev, drbd_bm_write, |
3416 | "detach", BM_LOCKED_MASK)) { | 3420 | "detach", BM_LOCKED_TEST_ALLOWED)) { |
3417 | if (test_bit(WAS_READ_ERROR, &mdev->flags)) { | 3421 | if (test_bit(WAS_READ_ERROR, &mdev->flags)) { |
3418 | drbd_md_set_flag(mdev, MDF_FULL_SYNC); | 3422 | drbd_md_set_flag(mdev, MDF_FULL_SYNC); |
3419 | drbd_md_sync(mdev); | 3423 | drbd_md_sync(mdev); |