aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-01-24 11:19:42 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:58:36 -0500
commita0d856dfaed16efb9600b2a7d147cb6dbc11ff94 (patch)
tree48b11d912c045a0bf7ff2eed3cfd1abe62c9e31f /drivers/block/drbd/drbd_main.c
parentb406777e6496de346e8ee12fa64e1fe0adc02a78 (diff)
drbd: base completion and destruction of requests on ref counts
cherry-picked and adapted from drbd 9 devel branch The logic for when to get or put a reference is in mod_rq_state(). To not get confused in the freeze/thaw respectively resend/restart paths, or when cleaning up requests waiting for P_BARRIER_ACK, this also introduces additional state flags: RQ_COMPLETION_SUSP, and RQ_EXP_BARR_ACK. 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_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index bedfeeccd513..d07cb31a36ea 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -210,7 +210,7 @@ void tl_release(struct drbd_tconn *tconn, unsigned int barrier_nr,
210 /* find latest not yet barrier-acked write request, 210 /* find latest not yet barrier-acked write request,
211 * count writes in its epoch. */ 211 * count writes in its epoch. */
212 list_for_each_entry(r, &tconn->transfer_log, tl_requests) { 212 list_for_each_entry(r, &tconn->transfer_log, tl_requests) {
213 const unsigned long s = r->rq_state; 213 const unsigned s = r->rq_state;
214 if (!req) { 214 if (!req) {
215 if (!(s & RQ_WRITE)) 215 if (!(s & RQ_WRITE))
216 continue; 216 continue;