[DRBD-cvs] svn commit by phil - r2065 - branches/drbd-0.7/drbd - When connecting a diskless node to a node with a disk,

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Fri Feb 10 13:24:57 CET 2006


Author: phil
Date: 2006-02-10 13:24:56 +0100 (Fri, 10 Feb 2006)
New Revision: 2065

Modified:
   branches/drbd-0.7/drbd/drbd_fs.c
Log:
When connecting a diskless node to a node with a disk, the diskless
node eventually tried to write its bitmap to disk. Fixed that.


Modified: branches/drbd-0.7/drbd/drbd_fs.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_fs.c	2006-02-09 12:40:48 UTC (rev 2064)
+++ branches/drbd-0.7/drbd/drbd_fs.c	2006-02-10 12:24:56 UTC (rev 2065)
@@ -143,10 +143,13 @@
 	}
 
 	if ( la_size_changed || md_moved ) {
-		drbd_al_shrink(mdev); // All extents inactive.
-		drbd_bm_write(mdev);  // write bitmap
-		// Write mdev->la_size to [possibly new position on] disk.
-		drbd_md_write(mdev);
+		if( inc_local_md_only(mdev)) {
+			drbd_al_shrink(mdev); // All extents inactive.
+			drbd_bm_write(mdev);  // write bitmap
+			// Write mdev->la_size to on disk.
+			drbd_md_write(mdev);
+			dec_local(mdev);
+		}
 	}
   out:
 	lc_unlock(mdev->act_log);



More information about the drbd-cvs mailing list