Skip to content

Commit bca1cba

Browse files
lgeaxboe
authored andcommitted
drbd: adjust assert in w_bitmap_io to account for BM_LOCKED_CHANGE_ALLOWED
Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 92d94ae commit bca1cba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/block/drbd/drbd_main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3523,7 +3523,12 @@ static int w_bitmap_io(struct drbd_work *w, int unused)
35233523
struct bm_io_work *work = &device->bm_io_work;
35243524
int rv = -EIO;
35253525

3526-
D_ASSERT(device, atomic_read(&device->ap_bio_cnt) == 0);
3526+
if (work->flags != BM_LOCKED_CHANGE_ALLOWED) {
3527+
int cnt = atomic_read(&device->ap_bio_cnt);
3528+
if (cnt)
3529+
drbd_err(device, "FIXME: ap_bio_cnt %d, expected 0; queued for '%s'\n",
3530+
cnt, work->why);
3531+
}
35273532

35283533
if (get_ldev(device)) {
35293534
drbd_bm_lock(device, work->why, work->flags);

0 commit comments

Comments
 (0)