summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_int.h
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-01-24 19:58:11 +0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 19:58:36 +0400
commitb406777e6496de346e8ee12fa64e1fe0adc02a78 (patch)
tree8768b007631a8f2e57639bb1f80b158cfa49af3a /drivers/block/drbd/drbd_int.h
parent5df69ece6e93cfd4e09b14bf32bd101df6cbde38 (diff)
downloadlinux-b406777e6496de346e8ee12fa64e1fe0adc02a78.tar.xz
drbd: introduce completion_ref and kref to struct drbd_request
cherry-picked and adapted from drbd 9 devel branch completion_ref will count pending events necessary for completion. kref is for destruction. This only introduces these new members of struct drbd_request, a followup patch will make actual use of them. 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_int.h')
-rw-r--r--drivers/block/drbd/drbd_int.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 8536fabbf984..52ad1bfce85a 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -577,6 +577,11 @@ struct drbd_request {
struct bio *master_bio; /* master bio pointer */
unsigned long rq_state; /* see comments above _req_mod() */
unsigned long start_time;
+
+ /* once it hits 0, we may complete the master_bio */
+ atomic_t completion_ref;
+ /* once it hits 0, we may destroy this drbd_request object */
+ struct kref kref;
};
struct drbd_epoch {