|
@@ -3563,7 +3563,9 @@ void drbd_queue_bitmap_io(struct drbd_device *device,
|
|
|
|
|
|
spin_lock_irq(&device->resource->req_lock);
|
|
spin_lock_irq(&device->resource->req_lock);
|
|
set_bit(BITMAP_IO, &device->flags);
|
|
set_bit(BITMAP_IO, &device->flags);
|
|
- if (atomic_read(&device->ap_bio_cnt) == 0) {
|
|
|
|
|
|
+ /* don't wait for pending application IO if the caller indicates that
|
|
|
|
+ * application IO does not conflict anyways. */
|
|
|
|
+ if (flags == BM_LOCKED_CHANGE_ALLOWED || atomic_read(&device->ap_bio_cnt) == 0) {
|
|
if (!test_and_set_bit(BITMAP_IO_QUEUED, &device->flags))
|
|
if (!test_and_set_bit(BITMAP_IO_QUEUED, &device->flags))
|
|
drbd_queue_work(&first_peer_device(device)->connection->sender_work,
|
|
drbd_queue_work(&first_peer_device(device)->connection->sender_work,
|
|
&device->bm_io_work.w);
|
|
&device->bm_io_work.w);
|