[DRBD-cvs] svn commit by lars - r2413 - trunk/drbd - don't dec_ap_pending for the unsent barrier of the curr

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Wed Sep 13 14:34:26 CEST 2006


Author: lars
Date: 2006-09-13 14:34:25 +0200 (Wed, 13 Sep 2006)
New Revision: 2413

Modified:
   trunk/drbd/drbd_main.c
Log:
don't dec_ap_pending for the unsent barrier of the current epoch

Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c	2006-09-13 11:53:17 UTC (rev 2412)
+++ trunk/drbd/drbd_main.c	2006-09-13 12:34:25 UTC (rev 2413)
@@ -280,7 +280,6 @@
 			WARN("FIXME explain this race...");
 			list_del(&b->requests);
 		}
-		dec_ap_pending(mdev); /* for the barrier */
 		if (b == mdev->newest_barrier) {
 			D_ASSERT(tmp == NULL);
 			b->br_number=4711;
@@ -291,6 +290,11 @@
 		}
 		kfree(b);
 		b = tmp;
+		/* dec_ap_pending corresponding to _drbd_send_barrier;
+		 * note: the barrier for the current epoch (newest_barrier)
+		 * has not been sent yet, so we don't dec_ap_pending for it
+		 * here, either */
+		dec_ap_pending(mdev);
 	}
 	D_ASSERT(mdev->newest_barrier == mdev->oldest_barrier);
 	D_ASSERT(mdev->newest_barrier->br_number == 4711);



More information about the drbd-cvs mailing list