diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-11-07 09:56:29 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:34:53 -0500 |
commit | e3555d8545976703938d1b59e2db509426dbe02c (patch) | |
tree | a29b15c4ab07b51bf6e162ae68796c50718778aa /drivers/block/drbd/drbd_actlog.c | |
parent | 59817f4fab6a165ba83ce399464ba38432db8233 (diff) |
drbd: Implemented priority inheritance for resync requests
We only issue resync requests if there is no significant application IO
going on. = Application IO has higher priority than resnyc IO.
If application IO can not be started because the resync process locked
an resync_lru entry, start the IO operations necessary to release the
lock ASAP.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_actlog.c')
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 33f6cc537d08..28f85d950781 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
@@ -182,6 +182,7 @@ static struct lc_element *_al_get(struct drbd_conf *mdev, unsigned int enr) | |||
182 | if (unlikely(tmp != NULL)) { | 182 | if (unlikely(tmp != NULL)) { |
183 | struct bm_extent *bm_ext = lc_entry(tmp, struct bm_extent, lce); | 183 | struct bm_extent *bm_ext = lc_entry(tmp, struct bm_extent, lce); |
184 | if (test_bit(BME_NO_WRITES, &bm_ext->flags)) { | 184 | if (test_bit(BME_NO_WRITES, &bm_ext->flags)) { |
185 | set_bit(BME_PRIORITY, &bm_ext->flags); | ||
185 | spin_unlock_irq(&mdev->al_lock); | 186 | spin_unlock_irq(&mdev->al_lock); |
186 | return NULL; | 187 | return NULL; |
187 | } | 188 | } |
@@ -1297,8 +1298,7 @@ void drbd_rs_complete_io(struct drbd_conf *mdev, sector_t sector) | |||
1297 | } | 1298 | } |
1298 | 1299 | ||
1299 | if (lc_put(mdev->resync, &bm_ext->lce) == 0) { | 1300 | if (lc_put(mdev->resync, &bm_ext->lce) == 0) { |
1300 | clear_bit(BME_LOCKED, &bm_ext->flags); | 1301 | bm_ext->flags = 0; /* clear BME_LOCKED, BME_NO_WRITES and BME_PRIORITY */ |
1301 | clear_bit(BME_NO_WRITES, &bm_ext->flags); | ||
1302 | mdev->resync_locked--; | 1302 | mdev->resync_locked--; |
1303 | wake_up(&mdev->al_wait); | 1303 | wake_up(&mdev->al_wait); |
1304 | } | 1304 | } |