[DRBD-cvs] svn commit by lars - r2690 - trunk/drbd - make sure the activity log is still there when calling

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Mon Jan 15 09:14:42 CET 2007


Author: lars
Date: 2007-01-15 09:14:40 +0100 (Mon, 15 Jan 2007)
New Revision: 2690

Modified:
   trunk/drbd/drbd_req.c
Log:
make sure the activity log is still there when calling drbd_al_complete_io


Modified: trunk/drbd/drbd_req.c
===================================================================
--- trunk/drbd/drbd_req.c	2007-01-15 08:13:05 UTC (rev 2689)
+++ trunk/drbd/drbd_req.c	2007-01-15 08:14:40 UTC (rev 2690)
@@ -257,7 +257,13 @@
 			 * we would forget to resync the corresponding extent.
 			 */
 			if (s & RQ_LOCAL_MASK) {
-				drbd_al_complete_io(mdev, req->sector);
+				if (inc_local_if_state(mdev,Failed)) {
+					drbd_al_complete_io(mdev, req->sector);
+					dec_local(mdev);
+				} else {
+					WARN("Should have called drbd_al_complete_io(, %llu), "
+					     "but my Disk seems to have failed:(\n", req->sector);
+				}
 			}
 		}
 



More information about the drbd-cvs mailing list