diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2011-03-10 02:52:07 -0500 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-03-10 02:52:07 -0500 |
commit | 7eaceaccab5f40bbfda044629a6298616aeaed50 (patch) | |
tree | 33954d12f63e25a47eb6d86ef3d3d0a5e62bf752 /drivers/block/drbd/drbd_receiver.c | |
parent | 73c101011926c5832e6e141682180c4debe2cf45 (diff) |
block: remove per-queue plugging
Code has been converted over to the new explicit on-stack plugging,
and delay users have been converted to use the new API for that.
So lets kill off the old plugging along with aops->sync_page().
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 24487d4fb202..84132f8bf8a4 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -187,15 +187,6 @@ static struct page *drbd_pp_first_pages_or_try_alloc(struct drbd_conf *mdev, int | |||
187 | return NULL; | 187 | return NULL; |
188 | } | 188 | } |
189 | 189 | ||
190 | /* kick lower level device, if we have more than (arbitrary number) | ||
191 | * reference counts on it, which typically are locally submitted io | ||
192 | * requests. don't use unacked_cnt, so we speed up proto A and B, too. */ | ||
193 | static void maybe_kick_lo(struct drbd_conf *mdev) | ||
194 | { | ||
195 | if (atomic_read(&mdev->local_cnt) >= mdev->net_conf->unplug_watermark) | ||
196 | drbd_kick_lo(mdev); | ||
197 | } | ||
198 | |||
199 | static void reclaim_net_ee(struct drbd_conf *mdev, struct list_head *to_be_freed) | 190 | static void reclaim_net_ee(struct drbd_conf *mdev, struct list_head *to_be_freed) |
200 | { | 191 | { |
201 | struct drbd_epoch_entry *e; | 192 | struct drbd_epoch_entry *e; |
@@ -219,7 +210,6 @@ static void drbd_kick_lo_and_reclaim_net(struct drbd_conf *mdev) | |||
219 | LIST_HEAD(reclaimed); | 210 | LIST_HEAD(reclaimed); |
220 | struct drbd_epoch_entry *e, *t; | 211 | struct drbd_epoch_entry *e, *t; |
221 | 212 | ||
222 | maybe_kick_lo(mdev); | ||
223 | spin_lock_irq(&mdev->req_lock); | 213 | spin_lock_irq(&mdev->req_lock); |
224 | reclaim_net_ee(mdev, &reclaimed); | 214 | reclaim_net_ee(mdev, &reclaimed); |
225 | spin_unlock_irq(&mdev->req_lock); | 215 | spin_unlock_irq(&mdev->req_lock); |
@@ -436,8 +426,7 @@ void _drbd_wait_ee_list_empty(struct drbd_conf *mdev, struct list_head *head) | |||
436 | while (!list_empty(head)) { | 426 | while (!list_empty(head)) { |
437 | prepare_to_wait(&mdev->ee_wait, &wait, TASK_UNINTERRUPTIBLE); | 427 | prepare_to_wait(&mdev->ee_wait, &wait, TASK_UNINTERRUPTIBLE); |
438 | spin_unlock_irq(&mdev->req_lock); | 428 | spin_unlock_irq(&mdev->req_lock); |
439 | drbd_kick_lo(mdev); | 429 | io_schedule(); |
440 | schedule(); | ||
441 | finish_wait(&mdev->ee_wait, &wait); | 430 | finish_wait(&mdev->ee_wait, &wait); |
442 | spin_lock_irq(&mdev->req_lock); | 431 | spin_lock_irq(&mdev->req_lock); |
443 | } | 432 | } |
@@ -1147,7 +1136,6 @@ next_bio: | |||
1147 | 1136 | ||
1148 | drbd_generic_make_request(mdev, fault_type, bio); | 1137 | drbd_generic_make_request(mdev, fault_type, bio); |
1149 | } while (bios); | 1138 | } while (bios); |
1150 | maybe_kick_lo(mdev); | ||
1151 | return 0; | 1139 | return 0; |
1152 | 1140 | ||
1153 | fail: | 1141 | fail: |
@@ -1167,9 +1155,6 @@ static int receive_Barrier(struct drbd_conf *mdev, enum drbd_packets cmd, unsign | |||
1167 | 1155 | ||
1168 | inc_unacked(mdev); | 1156 | inc_unacked(mdev); |
1169 | 1157 | ||
1170 | if (mdev->net_conf->wire_protocol != DRBD_PROT_C) | ||
1171 | drbd_kick_lo(mdev); | ||
1172 | |||
1173 | mdev->current_epoch->barrier_nr = p->barrier; | 1158 | mdev->current_epoch->barrier_nr = p->barrier; |
1174 | rv = drbd_may_finish_epoch(mdev, mdev->current_epoch, EV_GOT_BARRIER_NR); | 1159 | rv = drbd_may_finish_epoch(mdev, mdev->current_epoch, EV_GOT_BARRIER_NR); |
1175 | 1160 | ||
@@ -3556,9 +3541,6 @@ static int receive_skip(struct drbd_conf *mdev, enum drbd_packets cmd, unsigned | |||
3556 | 3541 | ||
3557 | static int receive_UnplugRemote(struct drbd_conf *mdev, enum drbd_packets cmd, unsigned int data_size) | 3542 | static int receive_UnplugRemote(struct drbd_conf *mdev, enum drbd_packets cmd, unsigned int data_size) |
3558 | { | 3543 | { |
3559 | if (mdev->state.disk >= D_INCONSISTENT) | ||
3560 | drbd_kick_lo(mdev); | ||
3561 | |||
3562 | /* Make sure we've acked all the TCP data associated | 3544 | /* Make sure we've acked all the TCP data associated |
3563 | * with the data requests being unplugged */ | 3545 | * with the data requests being unplugged */ |
3564 | drbd_tcp_quickack(mdev->data.socket); | 3546 | drbd_tcp_quickack(mdev->data.socket); |