diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2016-06-14 00:26:16 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-13 21:43:04 -0600 |
commit | bca1cbaeac580f39d8777df35e1245ffe59d8079 (patch) | |
tree | a79ad3aa03ce7479abd7ba9ee02a18f0c54acb95 | |
parent | 92d94ae66aebda5e4832d96e96b95117c44693b5 (diff) |
drbd: adjust assert in w_bitmap_io to account for BM_LOCKED_CHANGE_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@fb.com>
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index b0891c3651dd..64e9525cd033 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -3523,7 +3523,12 @@ static int w_bitmap_io(struct drbd_work *w, int unused) struct bm_io_work *work = &device->bm_io_work; int rv = -EIO; - D_ASSERT(device, atomic_read(&device->ap_bio_cnt) == 0); + if (work->flags != BM_LOCKED_CHANGE_ALLOWED) { + int cnt = atomic_read(&device->ap_bio_cnt); + if (cnt) + drbd_err(device, "FIXME: ap_bio_cnt %d, expected 0; queued for '%s'\n", + cnt, work->why); + } if (get_ldev(device)) { drbd_bm_lock(device, work->why, work->flags); |