[DRBD-cvs] svn commit by phil - r2084 - in trunk: . drbd - Propagated the latest bug-fixes from the 07 branch.

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Feb 28 12:20:17 CET 2006


Author: phil
Date: 2006-02-28 12:20:15 +0100 (Tue, 28 Feb 2006)
New Revision: 2084

Modified:
   trunk/
   trunk/drbd/drbd_actlog.c
   trunk/drbd/drbd_fs.c
Log:
Propagated the latest bug-fixes from the 07 branch.



Property changes on: trunk
___________________________________________________________________
Name: propagate:at
   - 2068
   + 2083

Modified: trunk/drbd/drbd_actlog.c
===================================================================
--- trunk/drbd/drbd_actlog.c	2006-02-28 10:55:54 UTC (rev 2083)
+++ trunk/drbd/drbd_actlog.c	2006-02-28 11:20:15 UTC (rev 2084)
@@ -115,9 +115,9 @@
 	}
 
 #if DUMP_MD >= 3
-	INFO("%s [%d]:%s(,%ld,%s)\n",
+	INFO("%s [%d]:%s(,%llu,%s)\n",
 	     current->comm, current->pid, __func__,
-	     sector, rw ? "WRITE" : "READ");
+	     (unsigned long long)sector, rw ? "WRITE" : "READ");
 #endif
 
 	if (sector < drbd_md_first_sector(bdev)  || sector > drbd_md_last_sector(bdev)) {
@@ -424,7 +424,12 @@
 		trn=be32_to_cpu(buffer->tr_number);
 
 		spin_lock_irq(&mdev->al_lock);
-		for(j=0;j<AL_EXTENTS_PT+1;j++) {
+
+		/* This loop runs backwards because in the cyclic 
+		   elements there might be an old version of the
+		   updated element (in slot 0). So the element in slot 0
+		   can overwrite old versions. */
+		for(j=AL_EXTENTS_PT;j>=0;j--) {
 			pos = be32_to_cpu(buffer->updates[j].pos);
 			extent_nr = be32_to_cpu(buffer->updates[j].extent);
 
@@ -511,7 +516,7 @@
 	wake_up(&mdev->al_wait);
 
 	INFO("Marked additional %s as out-of-sync based on AL.\n",
-	     ppsize(ppb,add >> 1));
+	     ppsize(ppb,Bit2KB(add)));
 }
 
 static inline int _try_lc_del(struct Drbd_Conf *mdev,struct lc_element *al_ext)

Modified: trunk/drbd/drbd_fs.c
===================================================================
--- trunk/drbd/drbd_fs.c	2006-02-28 10:55:54 UTC (rev 2083)
+++ trunk/drbd/drbd_fs.c	2006-02-28 11:20:15 UTC (rev 2084)
@@ -532,7 +532,11 @@
 		} else {
 			nds = Inconsistent;
 		}
-		
+
+		/* All tests on MDF_PrimaryInd, MDF_ConnectedInd, 
+		   MDF_Consistent and MDF_WasUpToDate must happen before 
+		   this point, because drbd_request_state() modifies these
+		   flags. */
 		if(drbd_request_state(mdev,NS(disk,nds)) >= SS_Success ) {
 			drbd_thread_start(&mdev->worker);
 		}



More information about the drbd-cvs mailing list