diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-27 09:07:43 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-14 08:25:20 -0400 |
commit | 288f422ec13667de40b278535d2a5fb5c77352c4 (patch) | |
tree | fc8f594c05b05637a5052a41c603bbdad6f8641e /drivers/block/drbd/drbd_receiver.c | |
parent | 7e602c0aaf3e686c36cc742119f0f53f42e9befe (diff) |
drbd: Track all IO requests on the TL, not writes only
With that the drbd_fail_pending_reads() function becomes obsolete.
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_receiver.c')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 081522d3c742..88a5e1f4ec1d 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -3666,41 +3666,6 @@ static void drbdd(struct drbd_conf *mdev) | |||
3666 | } | 3666 | } |
3667 | } | 3667 | } |
3668 | 3668 | ||
3669 | static void drbd_fail_pending_reads(struct drbd_conf *mdev) | ||
3670 | { | ||
3671 | struct hlist_head *slot; | ||
3672 | struct hlist_node *pos; | ||
3673 | struct hlist_node *tmp; | ||
3674 | struct drbd_request *req; | ||
3675 | int i; | ||
3676 | |||
3677 | /* | ||
3678 | * Application READ requests | ||
3679 | */ | ||
3680 | spin_lock_irq(&mdev->req_lock); | ||
3681 | for (i = 0; i < APP_R_HSIZE; i++) { | ||
3682 | slot = mdev->app_reads_hash+i; | ||
3683 | hlist_for_each_entry_safe(req, pos, tmp, slot, colision) { | ||
3684 | /* it may (but should not any longer!) | ||
3685 | * be on the work queue; if that assert triggers, | ||
3686 | * we need to also grab the | ||
3687 | * spin_lock_irq(&mdev->data.work.q_lock); | ||
3688 | * and list_del_init here. */ | ||
3689 | D_ASSERT(list_empty(&req->w.list)); | ||
3690 | /* It would be nice to complete outside of spinlock. | ||
3691 | * But this is easier for now. */ | ||
3692 | _req_mod(req, connection_lost_while_pending); | ||
3693 | } | ||
3694 | } | ||
3695 | for (i = 0; i < APP_R_HSIZE; i++) | ||
3696 | if (!hlist_empty(mdev->app_reads_hash+i)) | ||
3697 | dev_warn(DEV, "ASSERT FAILED: app_reads_hash[%d].first: " | ||
3698 | "%p, should be NULL\n", i, mdev->app_reads_hash[i].first); | ||
3699 | |||
3700 | memset(mdev->app_reads_hash, 0, APP_R_HSIZE*sizeof(void *)); | ||
3701 | spin_unlock_irq(&mdev->req_lock); | ||
3702 | } | ||
3703 | |||
3704 | void drbd_flush_workqueue(struct drbd_conf *mdev) | 3669 | void drbd_flush_workqueue(struct drbd_conf *mdev) |
3705 | { | 3670 | { |
3706 | struct drbd_wq_barrier barr; | 3671 | struct drbd_wq_barrier barr; |
@@ -3770,8 +3735,6 @@ static void drbd_disconnect(struct drbd_conf *mdev) | |||
3770 | if (!mdev->state.susp) | 3735 | if (!mdev->state.susp) |
3771 | tl_clear(mdev); | 3736 | tl_clear(mdev); |
3772 | 3737 | ||
3773 | drbd_fail_pending_reads(mdev); | ||
3774 | |||
3775 | dev_info(DEV, "Connection closed\n"); | 3738 | dev_info(DEV, "Connection closed\n"); |
3776 | 3739 | ||
3777 | drbd_md_sync(mdev); | 3740 | drbd_md_sync(mdev); |