aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_int.h')
-rw-r--r--drivers/block/drbd/drbd_int.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 5136510ec8be..2704af2ccf61 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -2421,15 +2421,17 @@ static inline void dec_ap_bio(struct drbd_conf *mdev)
2421 int ap_bio = atomic_dec_return(&mdev->ap_bio_cnt); 2421 int ap_bio = atomic_dec_return(&mdev->ap_bio_cnt);
2422 2422
2423 D_ASSERT(ap_bio >= 0); 2423 D_ASSERT(ap_bio >= 0);
2424
2425 if (ap_bio == 0 && test_bit(BITMAP_IO, &mdev->flags)) {
2426 if (!test_and_set_bit(BITMAP_IO_QUEUED, &mdev->flags))
2427 drbd_queue_work(&mdev->data.work, &mdev->bm_io_work.w);
2428 }
2429
2424 /* this currently does wake_up for every dec_ap_bio! 2430 /* this currently does wake_up for every dec_ap_bio!
2425 * maybe rather introduce some type of hysteresis? 2431 * maybe rather introduce some type of hysteresis?
2426 * e.g. (ap_bio == mxb/2 || ap_bio == 0) ? */ 2432 * e.g. (ap_bio == mxb/2 || ap_bio == 0) ? */
2427 if (ap_bio < mxb) 2433 if (ap_bio < mxb)
2428 wake_up(&mdev->misc_wait); 2434 wake_up(&mdev->misc_wait);
2429 if (ap_bio == 0 && test_bit(BITMAP_IO, &mdev->flags)) {
2430 if (!test_and_set_bit(BITMAP_IO_QUEUED, &mdev->flags))
2431 drbd_queue_work(&mdev->data.work, &mdev->bm_io_work.w);
2432 }
2433} 2435}
2434 2436
2435static inline int drbd_set_ed_uuid(struct drbd_conf *mdev, u64 val) 2437static inline int drbd_set_ed_uuid(struct drbd_conf *mdev, u64 val)