[DRBD-cvs] r1913 - in branches/drbd-0.7: . drbd

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Fri Aug 5 15:21:31 CEST 2005


Author: lars
Date: 2005-08-05 15:21:30 +0200 (Fri, 05 Aug 2005)
New Revision: 1913

Modified:
   branches/drbd-0.7/Makefile
   branches/drbd-0.7/drbd/Makefile
   branches/drbd-0.7/drbd/drbd_fs.c
   branches/drbd-0.7/drbd/drbd_main.c
Log:
only allow invalidate during stable sates (Standalone or Connected)

if we say we always onle change thi->task within the spinlock, we should do so.
(this was uncritical, though).

include the "last changed" revision in the buildtag,
not the "last updated" or repository revision.


Modified: branches/drbd-0.7/Makefile
===================================================================
--- branches/drbd-0.7/Makefile	2005-08-01 08:03:53 UTC (rev 1912)
+++ branches/drbd-0.7/Makefile	2005-08-05 13:21:30 UTC (rev 1913)
@@ -149,6 +149,7 @@
 	fi
 
 prepare_release:
+	svn up
 	$(MAKE) tarball
 	$(MAKE) tarball PRESERVE_DEBIAN=1
 

Modified: branches/drbd-0.7/drbd/Makefile
===================================================================
--- branches/drbd-0.7/drbd/Makefile	2005-08-01 08:03:53 UTC (rev 1912)
+++ branches/drbd-0.7/drbd/Makefile	2005-08-05 13:21:30 UTC (rev 1913)
@@ -96,7 +96,8 @@
 	  fi;									\
 	  grep return $@ ;							\
 	else									\
-	  echo -ne "\treturn \"SVN Revision: "; svnversion -n ..; echo \";	\
+	  SVNREV=$$(svnversion -n -c ..);					\
+	  echo -e "\treturn \"SVN Revision: $${SVNREV##*:}\"";	 		\
 	fi ;									\
 	echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}";	\
        	mv $@{.new,}

Modified: branches/drbd-0.7/drbd/drbd_fs.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_fs.c	2005-08-01 08:03:53 UTC (rev 1912)
+++ branches/drbd-0.7/drbd/drbd_fs.c	2005-08-05 13:21:30 UTC (rev 1913)
@@ -1268,9 +1268,9 @@
 		/* disallow "invalidation" of local replica
 		 * when currently in primary state (would be a Bad Idea),
 		 * or during a running sync (won't make any sense) */
-		if( mdev->state == Primary ||
-		    mdev->cstate < StandAlone ||
-		    mdev->cstate > Connected ||
+		if( (mdev->state == Primary ||
+		      (mdev->cstate != Connected &&
+		       mdev->cstate != StandAlone)) ||
 		    test_bit(DISKLESS,&mdev->flags) ||
 		    test_bit(PARTNER_DISKLESS,&mdev->flags) ) {
 			err = -EINPROGRESS;

Modified: branches/drbd-0.7/drbd/drbd_main.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_main.c	2005-08-01 08:03:53 UTC (rev 1912)
+++ branches/drbd-0.7/drbd/drbd_main.c	2005-08-05 13:21:30 UTC (rev 1913)
@@ -484,8 +484,10 @@
 	drbd_daemonize();
 	D_ASSERT(get_t_state(thi) == Running);
 	D_ASSERT(thi->task == NULL);
+	spin_lock(&thi->t_lock);
 	thi->task = current;
 	smp_mb();
+	spin_unlock(&thi->t_lock);
 	complete(&thi->startstop); // notify: thi->task is set.
 
 	retval = thi->function(thi);



More information about the drbd-cvs mailing list