drbd: adjust assert in w_bitmap_io to account for BM_LOCKED_CHANGE_ALLOWED
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 13 Jun 2016 22:26:16 +0000 (00:26 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 14 Jun 2016 03:43:04 +0000 (21:43 -0600)
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>
drivers/block/drbd/drbd_main.c

index b0891c3651dd522e662b0ef3379801b6e5a55f71..64e9525cd033ba45f3157fe456a1981d781ebaac 100644 (file)
@@ -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);