diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2012-01-24 16:58:11 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:58:36 +0100 |
commit | b406777e6496de346e8ee12fa64e1fe0adc02a78 (patch) | |
tree | 8768b007631a8f2e57639bb1f80b158cfa49af3a /drivers/block/drbd/drbd_int.h | |
parent | drbd: __drbd_make_request() is now void (diff) | |
download | linux-b406777e6496de346e8ee12fa64e1fe0adc02a78.tar.xz linux-b406777e6496de346e8ee12fa64e1fe0adc02a78.zip |
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.h | 5 |
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 { |