summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_req.h
diff options
context:
space:
mode:
authorLars Ellenberg2012-07-24 10:12:36 +0200
committerPhilipp Reisner2012-11-08 16:58:37 +0100
commit9a278a7906066a1b4f37fff9b5e27a92af0ca3ce (patch)
tree8dd98edd53bc8e0c17f2681e4418b96ffb7af736 /drivers/block/drbd/drbd_req.h
parentdrbd: __req_mod: make DISCARD_WRITE and independend case (diff)
downloadkernel-qcow2-linux-9a278a7906066a1b4f37fff9b5e27a92af0ca3ce.tar.gz
kernel-qcow2-linux-9a278a7906066a1b4f37fff9b5e27a92af0ca3ce.tar.xz
kernel-qcow2-linux-9a278a7906066a1b4f37fff9b5e27a92af0ca3ce.zip
drbd: allow read requests to be retried after force-detach
Sometimes, a lower level block device turns into a tar-pit, not completing requests at all, not even doing error completion. We can force-detach from such a tar-pit block device, either by disk-timeout, or by drbdadm detach --force. Queueing for retry only from the request destruction path (kref hit 0) makes it impossible to retry affected read requests from the peer, until the local IO completion happened, as the locally submitted bio holds a reference on the drbd request object. If we can only complete READs when the local completion finally happens, we would not need to force-detach in the first place. Instead, queue for retry where we otherwise had done the error completion. 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_req.h')
-rw-r--r--drivers/block/drbd/drbd_req.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_req.h b/drivers/block/drbd/drbd_req.h
index 90e5a1eea727..9611713c3580 100644
--- a/drivers/block/drbd/drbd_req.h
+++ b/drivers/block/drbd/drbd_req.h
@@ -267,6 +267,7 @@ struct bio_and_error {
int error;
};
+extern void drbd_req_destroy(struct kref *kref);
extern void _req_may_be_done(struct drbd_request *req,
struct bio_and_error *m);
extern int __req_mod(struct drbd_request *req, enum drbd_req_event what,