aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_int.h
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-01-24 10:58:11 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:58:36 -0500
commitb406777e6496de346e8ee12fa64e1fe0adc02a78 (patch)
tree8768b007631a8f2e57639bb1f80b158cfa49af3a /drivers/block/drbd/drbd_int.h
parent5df69ece6e93cfd4e09b14bf32bd101df6cbde38 (diff)
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 {
577 struct bio *master_bio; /* master bio pointer */ 577 struct bio *master_bio; /* master bio pointer */
578 unsigned long rq_state; /* see comments above _req_mod() */ 578 unsigned long rq_state; /* see comments above _req_mod() */
579 unsigned long start_time; 579 unsigned long start_time;
580
581 /* once it hits 0, we may complete the master_bio */
582 atomic_t completion_ref;
583 /* once it hits 0, we may destroy this drbd_request object */
584 struct kref kref;
580}; 585};
581 586
582struct drbd_epoch { 587struct drbd_epoch {