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 e010afff336a..22adfc7189de 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -2251,15 +2251,17 @@ static inline void dec_ap_bio(struct drbd_conf *mdev)
2251 int ap_bio = atomic_dec_return(&mdev->ap_bio_cnt); 2251 int ap_bio = atomic_dec_return(&mdev->ap_bio_cnt);
2252 2252
2253 D_ASSERT(ap_bio >= 0); 2253 D_ASSERT(ap_bio >= 0);
2254
2255 if (ap_bio == 0 && test_bit(BITMAP_IO, &mdev->flags)) {
2256 if (!test_and_set_bit(BITMAP_IO_QUEUED, &mdev->flags))
2257 drbd_queue_work(&mdev->tconn->sender_work, &mdev->bm_io_work.w);
2258 }
2259
2254 /* this currently does wake_up for every dec_ap_bio! 2260 /* this currently does wake_up for every dec_ap_bio!
2255 * maybe rather introduce some type of hysteresis? 2261 * maybe rather introduce some type of hysteresis?
2256 * e.g. (ap_bio == mxb/2 || ap_bio == 0) ? */ 2262 * e.g. (ap_bio == mxb/2 || ap_bio == 0) ? */
2257 if (ap_bio < mxb) 2263 if (ap_bio < mxb)
2258 wake_up(&mdev->misc_wait); 2264 wake_up(&mdev->misc_wait);
2259 if (ap_bio == 0 && test_bit(BITMAP_IO, &mdev->flags)) {
2260 if (!test_and_set_bit(BITMAP_IO_QUEUED, &mdev->flags))
2261 drbd_queue_work(&mdev->tconn->sender_work, &mdev->bm_io_work.w);
2262 }
2263} 2265}
2264 2266
2265static inline int drbd_set_ed_uuid(struct drbd_conf *mdev, u64 val) 2267static inline int drbd_set_ed_uuid(struct drbd_conf *mdev, u64 val)