From www-data at garcon.linbit.com  Mon May  9 10:13:39 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May  9 10:13:40 2005
Subject: [DRBD-cvs] r1789 - in branches/drbd-0.7: drbd scripts
Message-ID: <20050509081339.17549159DA@mail.linbit.com>

Author: phil
Date: 2005-05-09 10:13:38 +0200 (Mon, 09 May 2005)
New Revision: 1789

Modified:
   branches/drbd-0.7/drbd/drbd_bitmap.c
   branches/drbd-0.7/drbd/drbd_compat_types.h
   branches/drbd-0.7/scripts/adjust_drbd_config_h.sh
Log:
Patch by Paul Clement:
* Makes DRBD work on PPC64 - Linux-2.4.x 


Modified: branches/drbd-0.7/drbd/drbd_bitmap.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_bitmap.c	2005-04-26 19:43:54 UTC (rev 1788)
+++ branches/drbd-0.7/drbd/drbd_bitmap.c	2005-05-09 08:13:38 UTC (rev 1789)
@@ -33,6 +33,49 @@
 #include <linux/drbd.h>
 #include "drbd_int.h"
 
+/* special handling for ppc64 on 2.4 kernel -- find_next_bit is not exported
+ * so we include it here (verbatim, from linux 2.4.21 sources) */
+#if defined(__powerpc64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+
+unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset)
+{
+        unsigned long *p = addr + (offset >> 6);
+        unsigned long result = offset & ~63UL;
+        unsigned long tmp;
+
+        if (offset >= size)
+                return size;
+        size -= result;
+        offset &= 63UL;
+        if (offset) {
+                tmp = *(p++);
+                tmp &= (~0UL << offset);
+                if (size < 64)
+                        goto found_first;
+                if (tmp)
+                        goto found_middle;
+                size -= 64;
+                result += 64;
+        }
+        while (size & ~63UL) {
+                if ((tmp = *(p++)))
+                        goto found_middle;
+                result += 64;
+                size -= 64;
+        }
+        if (!size)
+                return result;
+        tmp = *p;
+
+found_first:
+        tmp &= (~0UL >> (64 - size));
+        if (tmp == 0UL)        /* Are any bits set? */
+                return result + size; /* Nope. */
+found_middle:
+        return result + __ffs(tmp);
+}
+#endif /* NEED_PPC64_WORKAROUND */
+
 /* OPAQUE outside this file!
  * interface defined in drbd_int.h
  *

Modified: branches/drbd-0.7/drbd/drbd_compat_types.h
===================================================================
--- branches/drbd-0.7/drbd/drbd_compat_types.h	2005-04-26 19:43:54 UTC (rev 1788)
+++ branches/drbd-0.7/drbd/drbd_compat_types.h	2005-05-09 08:13:38 UTC (rev 1789)
@@ -296,8 +296,8 @@
 #undef _x10000
 #undef _xSHIFT
 
-#else
-#warning "You probabely need to copy find_next_bit() from a 2.6.x kernel."
+#elif !defined(__powerpc64__) /* ppc64 is taken care of, see drbd_bitmap.c */
+#warning "You probably need to copy find_next_bit() from a 2.6.x kernel."
 #warning "Or enable low performance generic C-code"
 #warning "(USE_GENERIC_FIND_NEXT_BIT in drbd_config.h)"
 #endif

Modified: branches/drbd-0.7/scripts/adjust_drbd_config_h.sh
===================================================================
--- branches/drbd-0.7/scripts/adjust_drbd_config_h.sh	2005-04-26 19:43:54 UTC (rev 1788)
+++ branches/drbd-0.7/scripts/adjust_drbd_config_h.sh	2005-05-09 08:13:38 UTC (rev 1789)
@@ -59,7 +59,13 @@
     cat 2>/dev/null $KDIR/include/asm{,/arch}/bitops.h |
     grep_q 'find_next_bit'
   then
-    have_find_next_bit=1
+    # on ppc64, it's declared but not exported, so we use our own copy
+    if grep_q '^CONFIG_PPC64=y' $KDIR/.config
+    then
+      have_find_next_bit=0
+    else
+      have_find_next_bit=1
+    fi
   else
     have_find_next_bit=0
   fi

From www-data at garcon.linbit.com  Mon May  9 23:36:46 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May  9 23:36:48 2005
Subject: [DRBD-cvs] r1790 - in trunk: . drbd
Message-ID: <20050509213646.7232515BC1@mail.linbit.com>

Author: phil
Date: 2005-05-09 23:36:44 +0200 (Mon, 09 May 2005)
New Revision: 1790

Modified:
   trunk/ROADMAP
   trunk/drbd/drbd_fs.c
   trunk/drbd/drbd_main.c
   trunk/drbd/drbd_receiver.c
Log:
Fixed a bit of the "split-brain-fix" behaviour.
 - An even more strict mode of operation would be possible.
 - Now every thing works when I "disconnect" the peer. 
   Need to test what happens when the peer is "down"ed.


Modified: trunk/ROADMAP
===================================================================
--- trunk/ROADMAP	2005-05-09 08:13:38 UTC (rev 1789)
+++ trunk/ROADMAP	2005-05-09 21:36:44 UTC (rev 1790)
@@ -41,7 +41,9 @@
    discard-less-modified
                   Auto sync from is the node that did more modifications
    discard-NODENAME 
-                  Auto sync to the named node 
+                  Auto sync to the named node
+   discard-current-secondary
+   		  Auto sync from current primary (What if there is no primary?)
   
   pri-sees-sec-with-newer-data =
    disconnect         (current behaviour)

Modified: trunk/drbd/drbd_fs.c
===================================================================
--- trunk/drbd/drbd_fs.c	2005-05-09 08:13:38 UTC (rev 1789)
+++ trunk/drbd/drbd_fs.c	2005-05-09 21:36:44 UTC (rev 1790)
@@ -711,8 +711,8 @@
 	case 4: /* peer is outdated */
 		nps = Outdated;
 		break;
-	case 5: /* peer was down, increase GENCNT ... */
-		drbd_uuid_new_current(mdev);
+	case 5: /* peer was down, we will(have) create(d) a new UUID anyways... */
+		/* If we would be more strict, we would return DUnknown here. */
 		nps = Outdated;
 		break;
 	case 6: /* Peer is primary, voluntarily outdate myself */
@@ -721,11 +721,13 @@
 		break;
 	default:
 		/* The script is broken ... */
-		drbd_uuid_new_current(mdev);
 		nps = DUnknown;
-		ERR("outdate-peer helper returned %d (%d)\n",(r>>8)&0xff,r);
+		drbd_request_state(mdev,NS(disk,Outdated));
+		ERR("outdate-peer helper broken, returned %d \n",(r>>8)&0xff);
+		return nps;
 	}
 
+	INFO("outdate-peer helper returned %d \n",(r>>8)&0xff);
 	return nps;
 }
 

Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c	2005-05-09 08:13:38 UTC (rev 1789)
+++ trunk/drbd/drbd_main.c	2005-05-09 21:36:44 UTC (rev 1790)
@@ -648,6 +648,7 @@
 	}
 
 #if DUMP_MD >= 2
+	char *pbp,pb[300];
 	pbp = pb;
 	PSC(role);
 	PSC(peer);

Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2005-05-09 08:13:38 UTC (rev 1789)
+++ trunk/drbd/drbd_receiver.c	2005-05-09 21:36:44 UTC (rev 1790)
@@ -1883,11 +1883,19 @@
 	}
 
 	if ( mdev->state.s.role == Primary ) {
+		if ( mdev->state.s.pdsk >= DUnknown &&
+		     mdev->uuid[Bitmap] == 0 ) {
+			/* We only create a new UUID if the peer might
+			   possibly be UpToDate. Since the connection is
+			   already gone it is DUnknown by now. 
+			   In case we already created a BitMap there is
+			   no need to create a new UUID.
+			*/
+			drbd_uuid_new_current(mdev);
+		}
 		if ( test_bit(SPLIT_BRAIN_FIX,&mdev->flags) ) {
 			drbd_disks_t nps = drbd_try_outdate_peer(mdev);
 			drbd_request_state(mdev,NS(pdsk,nps));
-		} else {
-			drbd_uuid_new_current(mdev);
 		}
 		drbd_md_write(mdev);
 	}

From www-data at garcon.linbit.com  Tue May 10 20:22:15 2005
From: www-data at garcon.linbit.com (www-data)
Date: Tue May 10 20:22:17 2005
Subject: [DRBD-cvs] r1791 - in trunk: . documentation drbd drbd/linux user
Message-ID: <20050510182215.E515415815@mail.linbit.com>

Author: phil
Date: 2005-05-10 20:22:13 +0200 (Tue, 10 May 2005)
New Revision: 1791

Modified:
   trunk/ROADMAP
   trunk/documentation/drbdsetup.sgml
   trunk/drbd/drbd_fs.c
   trunk/drbd/drbd_int.h
   trunk/drbd/drbd_receiver.c
   trunk/drbd/linux/drbd.h
   trunk/user/drbdadm_main.c
   trunk/user/drbdsetup.c
Log:
* Removed the --human and --timeout-expired options to the primary
  command.
* Removed the on_primary helper command.

This crap is no longer needed with the UUID based data generation
scheme.



Modified: trunk/ROADMAP
===================================================================
--- trunk/ROADMAP	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/ROADMAP	2005-05-10 18:22:13 UTC (rev 1791)
@@ -406,11 +406,6 @@
   As well as the currently known flags: 
    Consistent, WasUpToDate, LastState, ConnectedInd, WantFullSync
 
-  The difference here is that the former flags are determined
-  when the current-UUID is created, while the latter are modified
-  as the state changes. When drbdmeta initializes the meta-data
-  block it sets the current-UUID to JustCreated (a 64 bit constant ).
-
   When the cluster is in Connected state, then the bitmpat gen-UUID
   is set to 0 (Since the Bitmap is empty). When we create a new current
   gen-UUID while we are disconencted the (old) current gets backed-up

Modified: trunk/documentation/drbdsetup.sgml
===================================================================
--- trunk/documentation/drbdsetup.sgml	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/documentation/drbdsetup.sgml	2005-05-10 18:22:13 UTC (rev 1791)
@@ -406,29 +406,6 @@
       </para>
       <variablelist>
 	<varlistentry>
-	  <term><option>-h</option>,
-	  <option>--human</option></term>
-	  <listitem>
-	    <para>
-	      Indicates that this state change was issued by an
-	      administrator and has at cluster restart time precedence over
-	      decisions made by other parties.  
-	  </para>
-	  </listitem>
-	</varlistentry>
-	<varlistentry>
-	  <term><option>-t</option>,
-	  <option>--timeout-expired</option></term>
-	  <listitem>
-	    <para>
-	      Indicates that this state change was caused because a node did
-	      not showed up on cluster startup (The cluster started in
-	      degraded mode). At cluster restart this has precedence over
-	      decisions made by the cluster manager.
-	    </para>
-	  </listitem>
-	</varlistentry>
-	<varlistentry>
 	  <term><option>-d</option>,
 	  <option>--do-what-I-say</option></term>
 	  <listitem>
@@ -455,22 +432,6 @@
       </para>
     </refsect2>
     <refsect2>
-      <title>on_primary</title>
-      <para>
-	This sets additional flags for the next
-	transition into primary state. The flags are only preserved as long 
-	as the <replaceable>device</replaceable> can not connect to its peer.
-	The possible flags are <option>--inc-human</option> and 
-	<option>--inc-timeout-expired</option>.
-      </para>
-      <para>
-	This is a conevenience command. It has the same effect as passing
-	this options to the following <option>primary</option> command
-	directly. See the <option>primary</option> command for a detailed
-	description of the two flags.
-      </para>
-    </refsect2>
-    <refsect2>
       <title>invalidate</title>
       <para>
 	This forces the local device of a pair of connected DRBD devices

Modified: trunk/drbd/drbd_fs.c
===================================================================
--- trunk/drbd/drbd_fs.c	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/drbd/drbd_fs.c	2005-05-10 18:22:13 UTC (rev 1791)
@@ -738,7 +738,7 @@
 
 	D_ASSERT(semaphore_is_locked(&mdev->device_mutex));
 
-	if ( (newstate & 0x3) == mdev->state.s.role ) return 0; /* nothing to do */
+	if ( (newstate & role_mask) == mdev->state.s.role ) return 0; /* nothing to do */
 
 	// exactly one of sec or pri. not both.
 	if ( !((newstate ^ (newstate >> 1)) & 1) ) return -EINVAL;
@@ -758,7 +758,7 @@
 
 	spin_lock_irq(&mdev->req_lock);
 	os = mdev->state;
-	r = _drbd_set_state(mdev, _NS(role,newstate & 0x3), 0);
+	r = _drbd_set_state(mdev, _NS(role,newstate & role_mask), 0);
 	ns = mdev->state;
 	spin_unlock_irq(&mdev->req_lock);
 	after_state_ch(mdev,os,ns);
@@ -774,7 +774,7 @@
 		/* --do-what-I-say*/
 		if (mdev->state.s.disk < UpToDate) {
 			WARN("Forcefully set to UpToDate!\n");
-			r = drbd_request_state(mdev,NS2(role,newstate & 0x3,
+			r = drbd_request_state(mdev,NS2(role,newstate & role_mask,
 							disk,UpToDate));
 			if(r<=0) return -EIO;
 
@@ -783,20 +783,11 @@
 	}
 	if ( r == -7 ) {
 		drbd_disks_t nps = drbd_try_outdate_peer(mdev);
-		r = drbd_request_state(mdev,NS2(role,newstate & 0x3,pdsk,nps));
+		r = drbd_request_state(mdev,NS2(role,newstate & role_mask,pdsk,nps));
 	} else if ( r <= 0 ) print_st_err(mdev,os,ns,r);
 
 	if ( r <= 0 ) return -EACCES; 
 
-	if (mdev->state.s.conn >= Connected) {
-		/* do NOT increase the Human count if we are connected,
-		 * and there is no reason for it.  See
-		 * drbd_lk9.pdf middle of Page 7
-		 */
-		newstate &= ~(Human|DontBlameDrbd);
-	}
-
-
 	drbd_sync_me(mdev);
 
 	/* Wait until nothing is on the fly :) */
@@ -825,16 +816,6 @@
 		bd_release(mdev->this_bdev);
 		mdev->this_bdev->bd_disk = mdev->vdisk;
 
-		if(test_bit(ON_PRI_INC_HUMAN,&mdev->flags)) {
-			newstate |= Human;
-			clear_bit(ON_PRI_INC_HUMAN,&mdev->flags);
-		}
-
-		if(test_bit(ON_PRI_INC_TIMEOUTEX,&mdev->flags)) {
-			newstate |= TimeoutExpired;
-			clear_bit(ON_PRI_INC_TIMEOUTEX,&mdev->flags);
-		}
-
 		if ( (mdev->state.s.conn < WFReportParams &&
 		      mdev->uuid[Bitmap] == 0) || forced ) {
 			drbd_uuid_new_current(mdev);
@@ -1074,28 +1055,13 @@
 		break;
 
 	case DRBD_IOCTL_SET_STATE:
-		if (arg & ~(Primary|Secondary|Human|TimeoutExpired|
-			    DontBlameDrbd) ) {
+		if (arg & ~(Primary|Secondary|DontBlameDrbd) ) {
 			err = -EINVAL;
 		} else {
 			err = drbd_set_role(mdev,arg);
 		}
 		break;
 
-	case DRBD_IOCTL_SET_STATE_FLAGS:
-		if (arg & ~(Human|TimeoutExpired) ) {
-			err = -EINVAL;
-		} else {
-			clear_bit(ON_PRI_INC_HUMAN,&mdev->flags);
-			clear_bit(ON_PRI_INC_TIMEOUTEX,&mdev->flags);
-
-			if (arg & Human ) 
-				set_bit(ON_PRI_INC_HUMAN,&mdev->flags);
-			if (arg & TimeoutExpired )
-				set_bit(ON_PRI_INC_TIMEOUTEX,&mdev->flags);
-		}
-		break;
-
 	case DRBD_IOCTL_SET_DISK_CONFIG:
 		err = drbd_ioctl_set_disk(mdev,(struct ioctl_disk_config*)arg);
 		break;

Modified: trunk/drbd/drbd_int.h
===================================================================
--- trunk/drbd/drbd_int.h	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/drbd/drbd_int.h	2005-05-10 18:22:13 UTC (rev 1791)
@@ -617,8 +617,6 @@
 	SEND_PING,		// whether asender should send a ping asap
 	WRITER_PRESENT,		// somebody opened us with write intent
 	STOP_SYNC_TIMER,	// tell timer to cancel itself
-	ON_PRI_INC_HUMAN,       // When we become primary increase human-count
-	ON_PRI_INC_TIMEOUTEX,   // When " - "  increase timeout-count
 	UNPLUG_QUEUED,		// only relevant with kernel 2.4
 	UNPLUG_REMOTE,		// whether sending a "UnplugRemote" makes sense
 	PROCESS_EE_RUNNING,	// eek!

Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/drbd/drbd_receiver.c	2005-05-10 18:22:13 UTC (rev 1791)
@@ -703,9 +703,6 @@
 		}
 	}
 
-	clear_bit(ON_PRI_INC_HUMAN,&mdev->flags);
-	clear_bit(ON_PRI_INC_TIMEOUTEX,&mdev->flags);
-
 	sock->sk->sk_sndtimeo = mdev->conf.timeout*HZ/20;
 	sock->sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT;
 

Modified: trunk/drbd/linux/drbd.h
===================================================================
--- trunk/drbd/linux/drbd.h	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/drbd/linux/drbd.h	2005-05-10 18:22:13 UTC (rev 1791)
@@ -175,9 +175,7 @@
 	Primary=1,     // role
 	Secondary=2,   // role
 	role_mask=3,
-	Human=4,           // flag for set_state
-	TimeoutExpired=8,  // flag for set_state
-	DontBlameDrbd=16   // flag for set_state
+	DontBlameDrbd=4   // flag for set_state
 } drbd_role_t;
 
 /* The order of these constants is important.

Modified: trunk/user/drbdadm_main.c
===================================================================
--- trunk/user/drbdadm_main.c	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/user/drbdadm_main.c	2005-05-10 18:22:13 UTC (rev 1791)
@@ -740,22 +740,6 @@
   return 0;
 }
 
-static int on_primary(struct d_resource* res ,char* flag)
-{
-  char* argv[20];
-  int argc=0;
-
-  argc=0;
-  argv[argc++]=drbdsetup;
-  argv[argc++]=res->me->device;
-  argv[argc++]="on_primary";
-  argv[argc++]=flag;
-  argv[argc++]=0;
-
-  return m_system(argv,SLEEPS_SHORT);
-}
-
-
 static int adm_wait_c(struct d_resource* res ,const char* unused)
 {
   char* argv[20];
@@ -771,10 +755,6 @@
 
   rv = m_system(argv,SLEEPS_FOREVER);
   
-  if(rv == 5) { // Timer expired
-    rv = on_primary(res,"--inc-timeout-expired");
-  }
-
   return rv;
 }
 
@@ -900,14 +880,9 @@
   int i=0,rv=0;
 
   for_each_resource(res,t,config) {
-    if (pids[i] == -5) {
-      rv |= on_primary(res,"--inc-timeout-expired");
+    if (pids[i] == -5 || pids[i] == -1000) {
       pids[i]=0;
     }
-    if (pids[i] == -1000) {
-      rv |= on_primary(res,"--inc-human");
-      pids[i]=0;
-    }
     if (pids[i] == -20) rv = 20;
     i++;
   }

Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c	2005-05-09 21:36:44 UTC (rev 1790)
+++ trunk/user/drbdsetup.c	2005-05-10 18:22:13 UTC (rev 1791)
@@ -98,7 +98,6 @@
 
 int cmd_primary(int drbd_fd,char** argv,int argc,struct option *options);
 int cmd_secondary(int drbd_fd,char** argv,int argc,struct option *options);
-int cmd_on_primary(int drbd_fd,char** argv,int argc,struct option *options);
 int cmd_wait_sync(int drbd_fd,char** argv,int argc,struct option *options);
 int cmd_wait_connect(int drbd_fd,char** argv,int argc,struct option *options);
 int cmd_invalidate(int drbd_fd,char** argv,int argc,struct option *options);
@@ -120,16 +119,9 @@
 struct drbd_cmd commands[] = {
   {"primary", cmd_primary,           0,
    (struct option[]) {
-     { "human",      no_argument,       0, 'h' },
      { "do-what-I-say",no_argument,     0, 'd' },
-     { "timeout-expired",no_argument,   0, 't' },
      { 0,            0,                 0, 0   } } },
   {"secondary", cmd_secondary,       0, 0, },
-  {"on_primary", cmd_on_primary,           0,
-   (struct option[]) {
-     { "inc-human",      no_argument,    0, 'h' },
-     { "inc-timeout-expired",no_argument,0, 't' },
-     { 0,            0,                 0, 0   } } },
   {"wait_sync", cmd_wait_sync,       0,
    (struct option[]) {
      { "wfc-timeout",required_argument, 0, 't' },
@@ -745,20 +737,11 @@
 	  int c;
 
 	  PRINT_ARGV;
-	  /* only --timeout-expired may be abbreviated to -t
-	   * --human and --do-what-I-say have to be spelled out */
+	  /* --do-what-I-say have to be spelled out */
 	  c = getopt_long_only(argc,argv,make_optstring(options,'-'),options,0);
 	  if(c == -1) break;
 	  switch(c)
 	    {
-	    case 'h':
-	      if (strcmp("--human",argv[optind-1])) {
-		      fprintf(stderr,"%s\nYou have to spell out --human, if you mean it\n",
-				      argv[optind-1]);
-		      return 20;
-	      }
-	      newstate |= Human;
-	      break;
 	    case 'd':
 	      if (strcmp("--do-what-I-say",argv[optind-1])) {
 		      fprintf(stderr,"%s\nYou have to spell out --do-what-I-say, if you mean it\n",
@@ -767,9 +750,6 @@
 	      }
 	      newstate |= DontBlameDrbd;
 	      break;
-	    case 't':
-	      newstate |= TimeoutExpired;
-	      break;
 	    case 1:	// non option argument. see getopt_long(3)
 	      fprintf(stderr,"%s: Unexpected nonoption argument '%s'\n",cmdname,optarg);
 	    case '?':
@@ -786,48 +766,6 @@
   return set_state(drbd_fd,Secondary);
 }
 
-int cmd_on_primary(int drbd_fd,char** argv,int argc,struct option *options)
-{
-  int err;
-  drbd_role_t flags=0;
-
-  if(argc > 0)
-    {
-      while(1)
-	{
-	  int c;
-
-	  PRINT_ARGV;
-
-	  c = getopt_long(argc,argv,make_optstring(options,'-'),options,0);
-	  if(c == -1) break;
-	  switch(c)
-	    {
-	    case 'h':
-	      flags |= Human;
-	      break;
-	    case 't':
-	      flags |= TimeoutExpired;
-	      break;
-	    case 1:	// non option argument. see getopt_long(3)
-	      fprintf(stderr,"%s: Unexpected nonoption argument '%s'\n",cmdname,optarg);
-	    case '?':
-	      return 20;
-	    }
-	}
-    }
-
-  err=ioctl(drbd_fd,DRBD_IOCTL_SET_STATE_FLAGS,flags);
-  if(err)
-    {
-      PERROR("ioctl(,SET_STATE_FLAGS,) failed");
-      exit(20);
-    }
-
-  return 0;
-}
-
-
 int wait_on(int drbd_fd,char** argv,int argc,int wfct,int dwfct, int req,
 	    struct option *options)
 {

From www-data at garcon.linbit.com  Tue May 10 22:02:46 2005
From: www-data at garcon.linbit.com (www-data)
Date: Tue May 10 22:02:48 2005
Subject: [DRBD-cvs] r1792 - in trunk: drbd drbd/linux user
Message-ID: <20050510200246.BEC2216543@mail.linbit.com>

Author: phil
Date: 2005-05-10 22:02:44 +0200 (Tue, 10 May 2005)
New Revision: 1792

Modified:
   trunk/drbd/drbd_fs.c
   trunk/drbd/drbd_int.h
   trunk/drbd/drbd_main.c
   trunk/drbd/drbd_receiver.c
   trunk/drbd/drbd_strings.c
   trunk/drbd/linux/drbd.h
   trunk/user/drbdadm_main.c
   trunk/user/drbdmeta.c
   trunk/user/drbdsetup.c
Log:
* Removed the "Unconfigured" conn state. Converted remaining
  uses to "StandAlone".
* drbdsetup primary/secondary now report the error string of
  drbd_set_state()/set_st_err_name(). No more duplication of
  error messages!
* In case we get "Unconfigured" (which is StandAlone and Diskless)
  we forget the pdsk state (set it to DUnknown).
* Fixed a bug with __module_get() and made the call to module_put()
  analog to __module_get()
* make 'drbdmeta outdate res' work again, was broken since the
  introductions of UUIDs.


Modified: trunk/drbd/drbd_fs.c
===================================================================
--- trunk/drbd/drbd_fs.c	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/drbd/drbd_fs.c	2005-05-10 20:02:44 UTC (rev 1792)
@@ -555,13 +555,13 @@
 #define O_ADDR(A) (((struct sockaddr_in *)&A.other_addr)->sin_addr.s_addr)
 #define O_PORT(A) (((struct sockaddr_in *)&A.other_addr)->sin_port)
 	for(i=0;i<minor_count;i++) {
-		if( i!=minor && drbd_conf[i].state.s.conn==Unconfigured &&
+		if( i!=minor && drbd_conf[i].state.s.conn > StandAlone &&
 		    M_ADDR(new_conf) == M_ADDR(drbd_conf[i].conf) &&
 		    M_PORT(new_conf) == M_PORT(drbd_conf[i].conf) ) {
 			retcode=LAAlreadyInUse;
 			goto fail_ioctl;
 		}
-		if( i!=minor && drbd_conf[i].state.s.conn!=Unconfigured &&
+		if( i!=minor && drbd_conf[i].state.s.conn > StandAlone &&
 		    O_ADDR(new_conf) == O_ADDR(drbd_conf[i].conf) &&
 		    O_PORT(new_conf) == O_PORT(drbd_conf[i].conf) ) {
 			retcode=OAAlreadyInUse;
@@ -731,8 +731,9 @@
 	return nps;
 }
 
-int drbd_set_role(drbd_dev *mdev,drbd_role_t newstate)
+int drbd_set_role(drbd_dev *mdev, int* arg)
 {
+	drbd_role_t newstate = *arg;
 	int r,forced = 0;
 	drbd_state_t os,ns;
 
@@ -763,11 +764,12 @@
 	spin_unlock_irq(&mdev->req_lock);
 	after_state_ch(mdev,os,ns);
 
-	if ( r == 2 ) { return 0; }
+	if ( r == 2 ) { return 0; /* nothing to do */ }
 	if ( r == -2 ) {
 		/* request state does not like the new state. */
 		if (! (newstate & DontBlameDrbd)) {
 			print_st_err(mdev,os,ns,r);
+			*arg = r;
 			return -EIO;
 		}
 
@@ -776,7 +778,10 @@
 			WARN("Forcefully set to UpToDate!\n");
 			r = drbd_request_state(mdev,NS2(role,newstate & role_mask,
 							disk,UpToDate));
-			if(r<=0) return -EIO;
+			if ( r <= 0 ) {
+				*arg = r;
+				return -EIO;
+			}
 
 			forced = 1;
 		}
@@ -786,7 +791,10 @@
 		r = drbd_request_state(mdev,NS2(role,newstate & role_mask,pdsk,nps));
 	} else if ( r <= 0 ) print_st_err(mdev,os,ns,r);
 
-	if ( r <= 0 ) return -EACCES; 
+	if ( r <= 0 ) {
+		*arg = r;
+		return -EIO;
+	}
 
 	drbd_sync_me(mdev);
 
@@ -1055,10 +1063,17 @@
 		break;
 
 	case DRBD_IOCTL_SET_STATE:
-		if (arg & ~(Primary|Secondary|DontBlameDrbd) ) {
+		if (copy_from_user(&r, (int *) arg, sizeof(int)))
+			return -EFAULT;
+
+		if (r & ~(Primary|Secondary|DontBlameDrbd) ) {
 			err = -EINVAL;
 		} else {
-			err = drbd_set_role(mdev,arg);
+			err = drbd_set_role(mdev, &r);
+			if ( err == -EIO ) {
+				err = put_user(r, (int *) arg);
+				if(err == 0) err=-EIO;
+			}
 		}
 		break;
 
@@ -1102,7 +1117,7 @@
 		break;
 
 	case DRBD_IOCTL_UNCONFIG_NET:
-		if ( mdev->state.s.conn == Unconfigured) break;
+		if ( mdev->state.s.conn == StandAlone) break;
 
 		r = drbd_request_state(mdev,NS(conn,StandAlone));
 		if( r == 2 ) { break; }
@@ -1121,12 +1136,6 @@
 
 		drbd_thread_stop(&mdev->receiver);
 
-		if ( mdev->state.s.conn == StandAlone && 
-		     mdev->state.s.disk == Diskless ) {
-			drbd_mdev_cleanup(mdev);  // Move to after_state_ch() ?
-			module_put(THIS_MODULE);
-		}
-
 		break;
 
 	case DRBD_IOCTL_UNCONFIG_DISK:

Modified: trunk/drbd/drbd_int.h
===================================================================
--- trunk/drbd/drbd_int.h	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/drbd/drbd_int.h	2005-05-10 20:02:44 UTC (rev 1792)
@@ -1000,7 +1000,7 @@
 extern char* ppsize(char* buf, size_t size);
 extern int drbd_determin_dev_size(drbd_dev*);
 extern void drbd_setup_queue_param(drbd_dev *mdev, unsigned int);
-extern int drbd_set_role(drbd_dev *mdev,drbd_role_t newstate);
+extern int drbd_set_role(drbd_dev *mdev, int *arg);
 extern int drbd_ioctl(struct inode *inode, struct file *file,
 		      unsigned int cmd, unsigned long arg);
 drbd_disks_t drbd_try_outdate_peer(drbd_dev *mdev);

Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/drbd/drbd_main.c	2005-05-10 20:02:44 UTC (rev 1792)
@@ -555,6 +555,10 @@
 		if ( ns.s.pdsk > DUnknown ) ns.s.pdsk = DUnknown;
 	}
 
+	if( ns.s.conn == StandAlone && ns.s.disk == Diskless ) {
+		ns.s.pdsk = DUnknown;
+	}
+
 	if( ns.s.conn > Connected && ns.s.disk <= Failed ) {
 		warn_sync_abort=1;
 		ns.s.conn = Connected;
@@ -668,11 +672,17 @@
 		mod_timer(&mdev->resync_timer,jiffies);
 	}
 
-	if ( os.s.disk == Diskless && os.s.peer == StandAlone &&
-	     (ns.s.disk >= Inconsistent || ns.s.peer > StandAlone) ) {
+	if ( os.s.disk == Diskless && os.s.conn == StandAlone &&
+	     (ns.s.disk >= Inconsistent || ns.s.conn > StandAlone) ) {
 		__module_get(THIS_MODULE);
 	}
 
+	if ( (os.s.disk >= Inconsistent || ns.s.conn > StandAlone) &&
+	     ns.s.disk == Diskless && ns.s.conn == StandAlone ) {
+		drbd_mdev_cleanup(mdev);
+		module_put(THIS_MODULE);
+	}
+
 	if ( ns.s.role == Primary && ns.s.conn < Connected &&
 	     ns.s.disk < Consistent ) {
 		drbd_panic("No access to good data anymore.\n");
@@ -1876,7 +1886,8 @@
 
 			if (mdev) {
 				down(&mdev->device_mutex);
-				drbd_set_role(mdev,Secondary);
+				rr = Secondary;
+				drbd_set_role(mdev,&rr);
 				up(&mdev->device_mutex);
 				drbd_sync_me(mdev);
 				drbd_thread_stop(&mdev->receiver);

Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/drbd/drbd_receiver.c	2005-05-10 20:02:44 UTC (rev 1792)
@@ -616,7 +616,7 @@
 {
 	struct socket *sock,*msock;
 
-	D_ASSERT(mdev->state.s.conn > Unconfigured);
+	D_ASSERT(mdev->state.s.conn > StandAlone);
 	D_ASSERT(!mdev->data.socket);
 
 	if(drbd_request_state(mdev,NS(conn,WFConnection)) <= 0 ) return 0;

Modified: trunk/drbd/drbd_strings.c
===================================================================
--- trunk/drbd/drbd_strings.c	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/drbd/drbd_strings.c	2005-05-10 20:02:44 UTC (rev 1792)
@@ -23,7 +23,6 @@
 #include <linux/drbd.h>
 
 static const char *drbd_conn_s_names[] = {
-	[Unconfigured]   = "Unconfigured",
 	[StandAlone]     = "StandAlone",
 	[Unconnected]    = "Unconnected",
 	[Timeout]        = "Timeout",
@@ -69,7 +68,7 @@
 };
 
 const char* conns_to_name(drbd_conns_t s) {
-	return s < Unconfigured ? "TO_SMALL" :
+	return s < StandAlone   ? "TO_SMALL" :
 	       s > PausedSyncT  ? "TO_LARGE"
 		                : drbd_conn_s_names[s];
 }

Modified: trunk/drbd/linux/drbd.h
===================================================================
--- trunk/drbd/linux/drbd.h	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/drbd/linux/drbd.h	2005-05-10 20:02:44 UTC (rev 1792)
@@ -188,7 +188,6 @@
  * so writes on a Primary after Skipped sync are not mirrored either ?
  */
 typedef enum {
-	Unconfigured,
 	StandAlone,
 	Unconnected,
 	Timeout,
@@ -296,7 +295,7 @@
  */
 #define DRBD_IOCTL_LETTER 'D'
 #define DRBD_IOCTL_GET_VERSION      _IOR( DRBD_IOCTL_LETTER, 0x00, int )
-#define DRBD_IOCTL_SET_STATE        _IOW( DRBD_IOCTL_LETTER, 0x02, drbd_role_t )
+#define DRBD_IOCTL_SET_STATE        _IOW( DRBD_IOCTL_LETTER, 0x02, int )
 #define DRBD_IOCTL_SET_DISK_CONFIG  _IOW( DRBD_IOCTL_LETTER, 0x06, struct ioctl_disk_config )
 #define DRBD_IOCTL_SET_NET_CONFIG   _IOW( DRBD_IOCTL_LETTER, 0x07, struct ioctl_net_config )
 #define DRBD_IOCTL_UNCONFIG_NET     _IO ( DRBD_IOCTL_LETTER, 0x08 )
@@ -308,7 +307,6 @@
 #define DRBD_IOCTL_WAIT_CONNECT     _IOR( DRBD_IOCTL_LETTER, 0x11, struct ioctl_wait )
 #define DRBD_IOCTL_WAIT_SYNC        _IOR( DRBD_IOCTL_LETTER, 0x12, struct ioctl_wait )
 #define DRBD_IOCTL_UNCONFIG_DISK    _IO ( DRBD_IOCTL_LETTER, 0x13 )
-#define DRBD_IOCTL_SET_STATE_FLAGS  _IOW( DRBD_IOCTL_LETTER, 0x14, drbd_role_t )
 #define DRBD_IOCTL_OUTDATE_DISK     _IOW( DRBD_IOCTL_LETTER, 0x15, int )
 #define DRBD_IOCTL_GET_UUIDS        _IOR( DRBD_IOCTL_LETTER, 0x16, struct ioctl_get_uuids )
 

Modified: trunk/user/drbdadm_main.c
===================================================================
--- trunk/user/drbdadm_main.c	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/user/drbdadm_main.c	2005-05-10 20:02:44 UTC (rev 1792)
@@ -672,7 +672,7 @@
   if(rv == 17) return rv; 
   // 17 returned by drbdsetup outdate, if it is already primary.
 
-  if( rv ) {
+  if( rv || dry_run ) {
     rv = admm_generic(res,cmd);
   }
   return rv;

Modified: trunk/user/drbdmeta.c
===================================================================
--- trunk/user/drbdmeta.c	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/user/drbdmeta.c	2005-05-10 20:02:44 UTC (rev 1792)
@@ -500,6 +500,7 @@
 	void (*get_gi) (struct md_cpu *md);
 	void (*show_gi) (struct md_cpu *md);
 	void (*set_gi) (struct md_cpu *md, char **argv, int argc);
+	int (*outdate_gi) (struct md_cpu *md);
 };
 
 /*
@@ -517,9 +518,11 @@
 void m_get_gc(struct md_cpu *md);
 void m_show_gc(struct md_cpu *md);
 void m_set_gc(struct md_cpu *md, char **argv, int argc);
+int m_outdate_gc(struct md_cpu *md);
 void m_get_uuid(struct md_cpu *md);
 void m_show_uuid(struct md_cpu *md);
 void m_set_uuid(struct md_cpu *md, char **argv, int argc);
+int m_outdate_uuid(struct md_cpu *md);
 
 int v06_md_close(struct format *cfg);
 int v06_md_cpu_to_disk(struct format *cfg);
@@ -553,6 +556,7 @@
 		     .get_gi = m_get_gc,
 		     .show_gi = m_show_gc,
 		     .set_gi = m_set_gc,
+		     .outdate_gi = m_outdate_gc,
 		     },
 	[Drbd_07] = {
 		     .name = "v07",
@@ -566,6 +570,7 @@
 		     .get_gi = m_get_gc,
 		     .show_gi = m_show_gc,
 		     .set_gi = m_set_gc,
+		     .outdate_gi = m_outdate_gc,
 		     },
 	[Drbd_08] = {
 		     .name = "v08",
@@ -579,6 +584,7 @@
 		     .get_gi = m_get_uuid,
 		     .show_gi = m_show_uuid,
 		     .set_gi = m_set_uuid,
+		     .outdate_gi = m_outdate_uuid,
 		     },
 };
 
@@ -923,9 +929,30 @@
 	} while (0);
 }
 
+int m_outdate_gc(struct md_cpu *md)
+{
+	if ( !(md->gc[Flags] & MDF_Consistent) ) {
+		return 5;
+	}
 
+	md->gc[Flags] &= ~MDF_WasUpToDate;
 
+	return 0;
+}
 
+int m_outdate_uuid(struct md_cpu *md)
+{
+	if ( !(md->flags & MDF_Consistent) ) {
+		return 5;
+	}
+
+	md->flags &= ~MDF_WasUpToDate;
+
+	return 0;
+}
+
+
+
 /******************************************
  begin of v06 {{{
  ******************************************/
@@ -1777,13 +1804,11 @@
 	if (cfg->ops->open(cfg))
 		return -1;
 
-	if ( !(cfg->md.gc[Flags] & MDF_Consistent) ) {
+	if (cfg->ops->outdate_gi(&cfg->md)) {
 		fprintf(stderr, "Device is inconsistent.\n");
 		exit(5);
 	}
 
-	cfg->md.gc[Flags] &= ~MDF_WasUpToDate;
-
 	err = cfg->ops->md_cpu_to_disk(cfg)
 		|| cfg->ops->close(cfg);
 	if (err)

Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c	2005-05-10 18:22:13 UTC (rev 1791)
+++ trunk/user/drbdsetup.c	2005-05-10 20:02:44 UTC (rev 1792)
@@ -698,8 +698,8 @@
 
 int set_state(int drbd_fd,drbd_role_t state)
 {
-  int err;
-  err=ioctl(drbd_fd,DRBD_IOCTL_SET_STATE,state);
+  int err, arg = state;
+  err=ioctl(drbd_fd,DRBD_IOCTL_SET_STATE,&arg);
   if(err) {
     err=errno;
     PERROR("ioctl(,SET_STATE,) failed");
@@ -708,17 +708,9 @@
       case EBUSY:
 	fprintf(stderr,"Someone has opened the device for RW access!\n");
 	break;
-      case EINPROGRESS:
-	fprintf(stderr,"Resynchronization process currently running!\n");
-	break;
-      case ENXIO:
-	fprintf(stderr,"Device not configured\n");
-	break;
-      case EACCES:
-	fprintf(stderr,"Partner is already primary\n");
-	break;
       case EIO:
-	fprintf(stderr,"Local replica is inconsistent (--do-what-I-say ?)\n");
+	fprintf(stderr,"%s\n", set_st_err_name(arg));
+        break;
       }
     return 20;
   }

From www-data at garcon.linbit.com  Wed May 11 10:27:51 2005
From: www-data at garcon.linbit.com (www-data)
Date: Wed May 11 10:27:52 2005
Subject: [DRBD-cvs] r1793 - trunk
Message-ID: <20050511082751.77E9F159E5@mail.linbit.com>

Author: phil
Date: 2005-05-11 10:27:50 +0200 (Wed, 11 May 2005)
New Revision: 1793

Modified:
   trunk/ROADMAP
Log:
Documented some ideas


Modified: trunk/ROADMAP
===================================================================
--- trunk/ROADMAP	2005-05-10 20:02:44 UTC (rev 1792)
+++ trunk/ROADMAP	2005-05-11 08:27:50 UTC (rev 1793)
@@ -464,9 +464,9 @@
            NB: If they are needed, I think they can be implemented
                as special UUID values.
 
-  90% DONE. Kernel part is implemented, userlang parts are implemented,
-	    only "drbdadm set-gi" is still unimplemented.
-	    Everything seems to work so far. Should be tested more.
+  99% DONE. Kernel part is implemented, userlang parts are implemented,
+	    --humand and --timeout-expired are removed.
+	    Everything seems to work so far.
 
 17 Something like
 
@@ -475,7 +475,17 @@
   would be nice at (initial) full sync.
   drbdx: WARNING disk sizes more than 10% different   
 
+18 Connection-Teardown Packet. Currently the new state-checks
+  disallows "drbdadm disconnect res" on the primary node of a
+  connected cluster.
+  Thes Teardown Packet causes the secondary-node to outdate
+  its data and to close the connection in one go.
+  0% DONE.
 
+19 Should we expect the user to use "set-gi" to recover from a
+  aplit brain (two disconnected primaries) situation ?
+  Should we provide him commands like "drbdadm winner res"
+  "drbdadm looser res", to resolve the situation.
 
 plus-banches:
 ----------------------
@@ -500,3 +510,6 @@
   setup.
 
 7 Support to pass LockFS calls / make taking of snapshots possible (?)
+
+8 Dynamic device allocation (displace minor_count module parameter)
+

From www-data at garcon.linbit.com  Thu May 12 09:08:50 2005
From: www-data at garcon.linbit.com (www-data)
Date: Thu May 12 09:08:51 2005
Subject: [DRBD-cvs] r1794 - branches/drbd-0.7
Message-ID: <20050512070850.19C3C16144@mail.linbit.com>

Author: phil
Date: 2005-05-12 09:08:49 +0200 (Thu, 12 May 2005)
New Revision: 1794

Modified:
   branches/drbd-0.7/ChangeLog
Log:
Preparing 0.7.11


Modified: branches/drbd-0.7/ChangeLog
===================================================================
--- branches/drbd-0.7/ChangeLog	2005-05-11 08:27:50 UTC (rev 1793)
+++ branches/drbd-0.7/ChangeLog	2005-05-12 07:08:49 UTC (rev 1794)
@@ -1,9 +1,21 @@
 Latest:
 ------
- ChangeLog last updated: r1730 2005-01-25
+ ChangeLog last updated: r1778 2005-05-09
  Cumulative changes since last tarball.
  For even more detail, use "svn log" and "svn diff".
 
+0.7.11 (api:77/proto:74)
+-----
+ * The upper limit of the runtime tuning parameter max_buffers 
+   was ways too low for today's IBM storage controllers. 
+   Was 32 - 10000 ; Now it is 32 - 131072 ( Now one could 
+   allow DRBD to allocate up to half a gigabyte of memory as 
+   receive buffers)
+ * A fix to the Makefiles to make building of RPMs work on RAHS4.
+ * A workaround to have DBRD running on PPC64 with Linux-2.4.x kernels,
+   on Linux-2.6.x everything was fine already.
+ * Removal of dead code (busy_blocks).
+
 0.7.10 (api:77/proto:74)
 -----
  * 0.7.9 had a memory corruption bug and memory leakage (BIOs).

From www-data at garcon.linbit.com  Thu May 12 09:11:32 2005
From: www-data at garcon.linbit.com (www-data)
Date: Thu May 12 09:11:33 2005
Subject: [DRBD-cvs] r1795 - tags
Message-ID: <20050512071132.A3AE3159BC@mail.linbit.com>

Author: phil
Date: 2005-05-12 09:11:31 +0200 (Thu, 12 May 2005)
New Revision: 1795

Added:
   tags/drbd-0.7.11/
Log:
Tagging 0.7.11


Copied: tags/drbd-0.7.11 (from rev 1794, branches/drbd-0.7)

From www-data at garcon.linbit.com  Thu May 12 09:13:31 2005
From: www-data at garcon.linbit.com (www-data)
Date: Thu May 12 09:13:32 2005
Subject: [DRBD-cvs] r1796 - tags
Message-ID: <20050512071331.D5F3515CBC@mail.linbit.com>

Author: phil
Date: 2005-05-12 09:13:31 +0200 (Thu, 12 May 2005)
New Revision: 1796

Removed:
   tags/drbd-0.7.11/
Log:
Oops, forgot to change version number ... 


From www-data at garcon.linbit.com  Mon May 23 15:23:35 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May 23 15:23:37 2005
Subject: [DRBD-cvs] r1798 - in branches/drbd-0.7: . drbd/linux
Message-ID: <20050523132335.31130166AA@mail.linbit.com>

Author: lars
Date: 2005-05-23 15:23:33 +0200 (Mon, 23 May 2005)
New Revision: 1798

Modified:
   branches/drbd-0.7/ChangeLog
   branches/drbd-0.7/drbd.spec.in
   branches/drbd-0.7/drbd/linux/drbd_config.h
Log:

prepare release 0.7.11


Modified: branches/drbd-0.7/ChangeLog
===================================================================
--- branches/drbd-0.7/ChangeLog	2005-05-12 12:48:43 UTC (rev 1797)
+++ branches/drbd-0.7/ChangeLog	2005-05-23 13:23:33 UTC (rev 1798)
@@ -1,6 +1,6 @@
 Latest:
 ------
- ChangeLog last updated: r1778 2005-05-09
+ ChangeLog last updated: r1798 2005-05-23
  Cumulative changes since last tarball.
  For even more detail, use "svn log" and "svn diff".
 

Modified: branches/drbd-0.7/drbd/linux/drbd_config.h
===================================================================
--- branches/drbd-0.7/drbd/linux/drbd_config.h	2005-05-12 12:48:43 UTC (rev 1797)
+++ branches/drbd-0.7/drbd/linux/drbd_config.h	2005-05-23 13:23:33 UTC (rev 1798)
@@ -22,7 +22,7 @@
 
 extern const char * drbd_buildtag(void);
 
-#define REL_VERSION "0.7.10"
+#define REL_VERSION "0.7.11"
 #define API_VERSION 77
 #define PRO_VERSION 74
 

Modified: branches/drbd-0.7/drbd.spec.in
===================================================================
--- branches/drbd-0.7/drbd.spec.in	2005-05-12 12:48:43 UTC (rev 1797)
+++ branches/drbd-0.7/drbd.spec.in	2005-05-23 13:23:33 UTC (rev 1798)
@@ -51,6 +51,8 @@
 #Release: %{release}_%{krelver}
 Group: System Environment/Kernel
 Requires: %{name} = %{version}, /sbin/depmod
+# conflicts with the suse km_drbd package. use either theirs, or ours... 
+Conflicts: km_drbd
 #%{?ksmp:Provides: kernel-module-drbd = %{version}-%{release}_%{krelver}}
 
 #%description -n kernel%{?ksmp}-module-drbd
@@ -137,6 +139,12 @@
 %doc drbd/k-config-%{kernelversion}.gz
 
 %post
+# hack for distribution kernel packages,
+# which already contain some (probably outdated) drbd module
+EXTRA_DRBD_KO=/lib/modules/%{kernelversion}/extra/drbd.ko
+if test -e $EXTRA_DRBD_KO; then
+	mv $EXTRA_DRBD_KO $EXTRA_DRBD_KO.orig
+fi
 chkconfig --add drbd
 
 for i in `seq 0 15` ; do 
@@ -171,6 +179,18 @@
 /sbin/depmod -a -F /boot/System.map-%{kernelversion} %{kernelversion} >/dev/null 2>&1 || true
 
 %changelog
+* Mon May 23 2005 15:11:39 +0200 Lars Ellenberg <lars@linbit.com>
+- drbd (0.7.11-1)
+ * The upper limit of the runtime tuning parameter max_buffers 
+   was ways too low for today's IBM storage controllers. 
+   Was 32 - 10000 ; Now it is 32 - 131072 ( Now one could 
+   allow DRBD to allocate up to half a gigabyte of memory as 
+   receive buffers)
+ * A fix to the Makefiles to make building of RPMs work on RAHS4.
+ * A workaround to have DBRD running on PPC64 with Linux-2.4.x kernels,
+   on Linux-2.6.x everything was fine already.
+ * Removal of dead code (busy_blocks).
+
 * Mon Jan 31 2005 10:17:00 +0200 Philipp Reisner <phil@linbit.com>
 - drbd (0.7.10-1)
  * 0.7.9 had a memory corruption bug and memory leakage (BIOs).

From www-data at garcon.linbit.com  Mon May 23 15:24:50 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May 23 15:24:51 2005
Subject: [DRBD-cvs] r1799 - tags
Message-ID: <20050523132450.CDC56166AC@mail.linbit.com>

Author: lars
Date: 2005-05-23 15:24:47 +0200 (Mon, 23 May 2005)
New Revision: 1799

Added:
   tags/drbd-0.7.11/
Log:
releasing 0.7.11


Copied: tags/drbd-0.7.11 (from rev 1798, branches/drbd-0.7)

From www-data at garcon.linbit.com  Mon May 23 21:46:51 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May 23 21:46:53 2005
Subject: [DRBD-cvs] r1800 - in branches/drbd-0.7: . debian
Message-ID: <20050523194651.4AC04160E5@mail.linbit.com>

Author: lars
Date: 2005-05-23 21:46:50 +0200 (Mon, 23 May 2005)
New Revision: 1800

Modified:
   branches/drbd-0.7/ChangeLog
   branches/drbd-0.7/debian/changelog
   branches/drbd-0.7/drbd.spec.in
Log:
added missing changelog updates
added mv /lib/modules/*/extra/drbd.ko -> *.orig rename
to post install of drbd-km- 



Modified: branches/drbd-0.7/ChangeLog
===================================================================
--- branches/drbd-0.7/ChangeLog	2005-05-23 13:24:47 UTC (rev 1799)
+++ branches/drbd-0.7/ChangeLog	2005-05-23 19:46:50 UTC (rev 1800)
@@ -1,6 +1,6 @@
 Latest:
 ------
- ChangeLog last updated: r1798 2005-05-23
+ ChangeLog last updated: r1801 2005-05-23
  Cumulative changes since last tarball.
  For even more detail, use "svn log" and "svn diff".
 
@@ -15,6 +15,11 @@
  * A workaround to have DBRD running on PPC64 with Linux-2.4.x kernels,
    on Linux-2.6.x everything was fine already.
  * Removal of dead code (busy_blocks).
+ * LINBIT drbd rpms now conflict with km_drbd
+   (SuSE's kernel module source hook)
+ * possibly existing /lib/modules/*/extra/drbd.ko are renamed to .orig in the
+   post-install scripts to avoid conflicts with existing modules from
+   distribution kernel packages
 
 0.7.10 (api:77/proto:74)
 -----

Modified: branches/drbd-0.7/debian/changelog
===================================================================
--- branches/drbd-0.7/debian/changelog	2005-05-23 13:24:47 UTC (rev 1799)
+++ branches/drbd-0.7/debian/changelog	2005-05-23 19:46:50 UTC (rev 1800)
@@ -1,3 +1,10 @@
+drbd (0.7.11-0) unstable; urgency=low
+
+  * (Philipp Reisner)
+     - New upstream release
+
+ -- Philipp Reisner <phil@linbit.com>  Mon, 23 May 2005 15:29:21 +0200
+
 drbd (0.7.10-0) unstable; urgency=low
 
   * (Philipp Reisner)

Modified: branches/drbd-0.7/drbd.spec.in
===================================================================
--- branches/drbd-0.7/drbd.spec.in	2005-05-23 13:24:47 UTC (rev 1799)
+++ branches/drbd-0.7/drbd.spec.in	2005-05-23 19:46:50 UTC (rev 1800)
@@ -171,6 +171,12 @@
 
 #%post -n kernel%{?ksmp}-module-drbd
 %post km-%{krelver}
+# hack for distribution kernel packages,
+# which already contain some (probably outdated) drbd module
+EXTRA_DRBD_KO=/lib/modules/%{kernelversion}/extra/drbd.ko
+if test -e $EXTRA_DRBD_KO; then
+	mv $EXTRA_DRBD_KO $EXTRA_DRBD_KO.orig
+fi
 uname -r | grep BOOT ||
 /sbin/depmod -a -F /boot/System.map-%{kernelversion} %{kernelversion} >/dev/null 2>&1 || true
 
@@ -190,6 +196,11 @@
  * A workaround to have DBRD running on PPC64 with Linux-2.4.x kernels,
    on Linux-2.6.x everything was fine already.
  * Removal of dead code (busy_blocks).
+ * LINBIT drbd rpms now conflict with km_drbd
+   (SuSE's kernel module source hook)
+ * possibly existing /lib/modules/*/extra/drbd.ko are renamed to .orig in the
+   post-install scripts to avoid conflicts with existing modules from
+   distribution kernel packages
 
 * Mon Jan 31 2005 10:17:00 +0200 Philipp Reisner <phil@linbit.com>
 - drbd (0.7.10-1)

From www-data at garcon.linbit.com  Mon May 23 21:48:49 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May 23 21:48:50 2005
Subject: [DRBD-cvs] r1801 - tags
Message-ID: <20050523194849.455F3160FC@mail.linbit.com>

Author: lars
Date: 2005-05-23 21:48:48 +0200 (Mon, 23 May 2005)
New Revision: 1801

Removed:
   tags/drbd-0.7.11/
Log:
was still not ready...
next commit adds the right one (hopefully...)



From www-data at garcon.linbit.com  Mon May 23 21:49:58 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May 23 21:49:59 2005
Subject: [DRBD-cvs] r1802 - tags
Message-ID: <20050523194958.EC334160FC@mail.linbit.com>

Author: lars
Date: 2005-05-23 21:49:58 +0200 (Mon, 23 May 2005)
New Revision: 1802

Added:
   tags/drbd-0.7.11/
Log:
ok, here finally is drbd Oh, seven-eleven ;-)



Copied: tags/drbd-0.7.11 (from rev 1801, branches/drbd-0.7)

From www-data at garcon.linbit.com  Tue May 24 10:28:53 2005
From: www-data at garcon.linbit.com (www-data)
Date: Tue May 24 10:28:54 2005
Subject: [DRBD-cvs] r1803 - branches/drbd-0.7
Message-ID: <20050524082853.799482587B@mail.linbit.com>

Author: phil
Date: 2005-05-24 10:28:52 +0200 (Tue, 24 May 2005)
New Revision: 1803

Modified:
   branches/drbd-0.7/drbd.spec.in
Log:
Building on SuSE-9.3 needs the LOCALVERSION ...


Modified: branches/drbd-0.7/drbd.spec.in
===================================================================
--- branches/drbd-0.7/drbd.spec.in	2005-05-23 19:49:58 UTC (rev 1802)
+++ branches/drbd-0.7/drbd.spec.in	2005-05-24 08:28:52 UTC (rev 1803)
@@ -78,8 +78,13 @@
 make clean
 # note: MANDIR is not used anywhere in the makefiles
 #       maybe this should be changed
-#       unset LOCALVERSION for building on RHEL AS 4
-make all doc PREFIX=%{buildroot}/ MANDIR=%{_mandir} KDIR=%{kdir} LOCALVERSION=""
+if [ -e /etc/redhat-release ]; then
+       # unset LOCALVERSION for building on RHEL AS 4
+       make all doc PREFIX=%{buildroot}/ MANDIR=%{_mandir} KDIR=%{kdir} LOCALVERSION=""
+else
+       # LOCALVERSION necessary for building on SuSE-9.3
+       make all doc PREFIX=%{buildroot}/ MANDIR=%{_mandir} KDIR=%{kdir}
+fi
 %install
 make install PREFIX=%{buildroot}/ MANDIR=%{_mandir}
 cd drbd

From www-data at garcon.linbit.com  Mon May 30 19:00:14 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May 30 19:00:16 2005
Subject: [DRBD-cvs] r1804 - in branches/drbd-0.7: . user
Message-ID: <20050530170014.B117E15F27@mail.linbit.com>

Author: lars
Date: 2005-05-30 19:00:13 +0200 (Mon, 30 May 2005)
New Revision: 1804

Modified:
   branches/drbd-0.7/Makefile
   branches/drbd-0.7/user/drbdadm_scanner.fl
Log:
* makefile update for internal use
* fixed flex input buffer overflow:
  drbdadm_scanner.fl produced tokens of arbitrary length due to excessive use
  of "+" and "*" modifiers. Now these are replaced with "{x,y}" modifiers, so
  it should no longer segfault.
  Though it may now produce parse errors where it suceeded before, if you
  happen to use 90 character long resource names or the like.



Modified: branches/drbd-0.7/Makefile
===================================================================
--- branches/drbd-0.7/Makefile	2005-05-24 08:28:52 UTC (rev 1803)
+++ branches/drbd-0.7/Makefile	2005-05-30 17:00:13 UTC (rev 1804)
@@ -32,11 +32,16 @@
 # or to forcefully include the svn-last-changed-date in the tgz name:
 #   make distclean doc tgz FORCE=1
 #
-REL_VERSION := $(REL_VERSION)-$(shell svn info| \
-		  sed -ne 's/^Last Changed Date: \([0-9]*\)-\([0-9]*\)-\([0-9]*\).*/\1\2\3/p')
+REL_VERSION := $(REL_VERSION)-$(shell LANG= svn info| \
+	sed -n -e 's/^Last Changed Date: \([0-9]*\)-\([0-9]*\)-\([0-9]*\).*/\1\2\3/p' \
+	)-$(shell svnversion .)
 endif
 
 DIST_VERSION := $(subst -,_,$(REL_VERSION))
+FDIST_VERSION := $(shell sed -ne 's,^drbd-\([^/]*\)/.*,\1,p;q' < .filelist)
+ifeq ($(FDIST_VERSION),)
+FDIST_VERSION := $(DIST_VERSION)
+endif
 
 LN_S = ln -s
 RPMBUILD=rpmbuild
@@ -139,23 +144,28 @@
 tgz:
 	test -e .filelist
 	ln -sf drbd/linux/drbd_config.h drbd_config.h
-	rm -f drbd-$(DIST_VERSION)
-	ln -s . drbd-$(DIST_VERSION)
+	rm -f drbd-$(FDIST_VERSION)
+	ln -s . drbd-$(FDIST_VERSION)
 	set -e ; for f in $$(<.filelist) ; do [ -e $$f ] ; done
-	tar --owner=0 --group=0 -czf drbd-$(DIST_VERSION).tar.gz -T .filelist
-	rm drbd-$(DIST_VERSION)
+	grep debian .filelist >/dev/null 2>&1 && _DEB=-debian || _DEB="" ; \
+	tar --owner=0 --group=0 -czf drbd-$(FDIST_VERSION)$$_DEB.tar.gz -T .filelist
+	rm drbd-$(FDIST_VERSION)
 
 ifeq ($(FORCE),)
 tgz: check_changelogs_up2date doc
 endif
 
 check_all_committed:
-	@modified=`svn st -q`; 		\
+	@$(if $(FORCE),-,)modified=`svn st -q`; 		\
 	if test -n "$$modified" ; then	\
 		echo "$$modified";	\
 	       	false;			\
 	fi
 
+prepare_release:
+	$(MAKE) tarball
+	$(MAKE) tarball PRESERVE_DEBIAN=1
+
 tarball: check_all_committed distclean doc .filelist tgz
 all tools doc .filelist: drbd/drbd_buildtag.c
 
@@ -181,11 +191,11 @@
 	         dist/TMP \
 	         dist/install \
 	         dist/SRPMS
-	[ -h dist/SOURCES/drbd-$(DIST_VERSION).tar.gz ] || \
-	  $(LN_S) $(PWD)/drbd-$(DIST_VERSION).tar.gz \
-	          $(PWD)/dist/SOURCES/drbd-$(DIST_VERSION).tar.gz
+	[ -h dist/SOURCES/drbd-$(FDIST_VERSION).tar.gz ] || \
+	  $(LN_S) $(PWD)/drbd-$(FDIST_VERSION).tar.gz \
+	          $(PWD)/dist/SOURCES/drbd-$(FDIST_VERSION).tar.gz
 	if test drbd.spec.in -nt dist/SPECS/drbd.spec ; then \
-	   sed -e "s/^\(Version:\).*/\1 $(DIST_VERSION)/;" \
+	   sed -e "s/^\(Version:\).*/\1 $(FDIST_VERSION)/;" \
 	       -e "s/^\(Packager:\).*/\1 $(USER)@$(HOSTNAME)/;" < drbd.spec.in \
 	   > dist/SPECS/drbd.spec ; \
 	fi

Modified: branches/drbd-0.7/user/drbdadm_scanner.fl
===================================================================
--- branches/drbd-0.7/user/drbdadm_scanner.fl	2005-05-24 08:28:52 UTC (rev 1803)
+++ branches/drbd-0.7/user/drbdadm_scanner.fl	2005-05-30 17:00:13 UTC (rev 1804)
@@ -31,16 +31,6 @@
  *		-- lge
  */ 
 
-/*
- * Philipp dislikes syntax diversity, and wants terminating semicolons.
- * So I drop what I thought would be nice to have: plain English and
- * punctuation...
-ASSIGN			  {LS}*[:=]{LS}*|{LS}(is{LS})?
-DISK			  disk|"on top of"
-IGNORE			  ({WSC}*(use|with)*)+
-NDELIM			  [^ \t\n#=:;{}]+
-*/
-
 %}
 
 %option noyywrap
@@ -51,29 +41,31 @@
 %x SEMICOLON ASSIGN NUM NUM_U NAME STRING PROTO IO_ERROR ON_DISCONNECT
 %x IP_AND_PORT PORT META_DISK META_IDX
 %x LS LBRACE IGNORE_SECTION
+%x COMMENT
 
-LS			  [ \t]+
-WS			  [ \t\n]+
-COMMENT			  \#[^\n]*
-WSC			  ({WS}|{COMMENT}\n)+
+LS			  [ \t]{1,80}
+WS			  ({LS}|\n)
+COMMENT_START		  \#
 ASSIGN			  {LS}
 OUT_OF_RANGE_NUM	  [0-9]{10,}[kmgKMG]? 
 NUM			  [0-9]{1,9}
 NUM_U			  [0-9]{1,9}[kmgKMG]? 
-NAME			  [/_.A-Za-z0-9-]+
-STRING			  ({NAME}|\"([^\"\\\n]*|\\.)*\")+
-USTRING			  \"([^\"\\\n]*|\\.)*
+NAME			  [/_.A-Za-z0-9-]{1,80}
+ENAME			  [/_.A-Za-z0-9-]{81}
+L_NO_DQUOTES		  [^\"\\\n]
+STRING			  ({NAME}|\"{L_NO_DQUOTES}{1,80}\")
+ESTRING			  (\"{L_NO_DQUOTES}{81}|\"\")
 DISK			  disk
 INTERN			  internal|\"internal\"
-META_IDX		  {LS}*\[{LS}*{NUM}{LS}*\]
-O_IDX			  {WSC}meta-index{ASSIGN}
-IGNORE			  {WSC}
-SKIP			  skip({LS}[^{\n]*)?
-NDELIM			  [^ \t\n#;{}]+
-_1_254			  [1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]
-_0_255			  0|[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-5]
+META_IDX		  {LS}?\[{LS}?{NUM}{LS}?\]
+O_IDX			  {WS}meta-index{ASSIGN}
+IGNORE			  {WS}
+SKIP			  skip({LS}[^{\n]{0,80})?
+NDELIM			  [^ \t\n#;{}]{1,50}
+_1_254			  [1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-4]
+_0_255			  0|[1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]
 IPV4ADDR		  {_1_254}\.{_0_255}\.{_0_255}\.{_1_254}
-PORT			  {WSC}port{ASSIGN}{NUM}
+PORT			  {WS}port{ASSIGN}{NUM}
 
 %%
 
@@ -81,9 +73,16 @@
   {SKIP}		section(IGNORE_SECTION);
 }
 
+<INITIAL,ASSIGN,LBRACE,META_IDX,RESOURCE,GLOBAL,STARTUP,DISK,NET,SYNCER,HOST,PORT>{
+  {COMMENT_START}	{
+  				char c;
+				while ((c = input()) != '\n' && c != EOF);
+				if (c == '\n') ++line;
+			}
+}
+
 <INITIAL>{
-  {COMMENT}		/* discard last comment if no eol at eof */
-  {WSC}			update_lcnt();
+  {WS}			update_lcnt();
   global		section(GLOBAL); return TK_GLOBAL;
   resource		named_section(RESOURCE); return TK_RESOURCE;
   \}			syntax_error("unmached closing brace.");
@@ -96,8 +95,9 @@
 }
 
 <NAME>{
+  {ENAME}		syntax_error("name too long.\n");
   {NAME}		yy_pop_state(); CP; return TK_STRING;
-  [^ \t\n#]+		expect_error("name"); /* not referenced currently */
+  [^ \t\n#]{1,80}	expect_error("name"); /* not referenced currently */
 }
 
 <SEMICOLON>{
@@ -110,7 +110,7 @@
 <ASSIGN>{
   {ASSIGN}		yy_pop_state(); fline = line;
   =			syntax_error("don't use '=' signs anymore!");
-  {WSC}			syntax_error("linebreak between option and value not allowed.\n");
+  {WS}			syntax_error("linebreak between option and value not allowed.\n");
   {NDELIM}		expect_error("whitespace");
 }
 
@@ -132,8 +132,9 @@
 }
 
 <STRING>{
+  {ENAME}		syntax_error("name too long.\n");
+  {ESTRING}		syntax_error("string terminator missing or string too long.\n");
   {STRING}		yy_pop_state(); unescape(); CP; return TK_STRING;
-  {USTRING}		syntax_error("string terminator missing.\n");
   {NDELIM}		expect_error("string"); yy_pop_state();
 }
 
@@ -145,7 +146,8 @@
 
 <PORT>{
   :			BEGIN(NUM); /* this is only reached when I have a colon */
-  {WSC}port{ASSIGN}	{
+  {WS}			update_lcnt();
+  port{ASSIGN}		{
 			  /* or a 'port = ' following the 'address = ' */
 			  update_lcnt(); BEGIN(NUM);
 			  PRINTF("'port=<port>' deprecated, "
@@ -154,16 +156,17 @@
 }
 
 <IP_AND_PORT>{
+  {LS}			/* ignore */
+  \"			syntax_error("please do not quote IP:PORT.\n");
   {IPV4ADDR}/:{NUM}	BEGIN(PORT); CP; return TK_IPADDR;
   {IPV4ADDR}/{PORT}	BEGIN(PORT); CP; return TK_IPADDR;
   {IPV4ADDR}		syntax_error("':PORT' missing from IP:PORT.\n");
-  \"{IPV4ADDR}[^ \t\n]+	syntax_error("please do not quote IP:PORT.\n");
-  [0-9.:]+		expect_error("valid IP");
   {NDELIM}		expect_error("IP and port 'XXX.XXX.XXX.XXX:PORT'");
 }
 
 <META_IDX>{
   {META_IDX}		unescape_midx(); yy_pop_state(); CP; return TK_INTEGER;
+  {WS}			update_lcnt();
   {O_IDX}		{
 			  update_lcnt(); BEGIN(NUM);
 			  PRINTF("'meta-index=<idx>' deprecated, "
@@ -175,9 +178,10 @@
   {INTERN}		unescape(); yy_pop_state();  CP; return TK_STRING;
   {INTERN}{META_IDX}	|
   {INTERN}{O_IDX}	syntax_error("don't give an index for internal meta-data.");
+  {ESTRING}		syntax_error("string terminator missing or string too long.\n");
   {STRING}/{META_IDX}	|
   {STRING}/{O_IDX}{NUM} unescape(); BEGIN(META_IDX); CP; return TK_STRING;
-  {STRING}{LS}*{NDELIM}	expect_error("meta-disk: index missing; either 'internal' or '/dev/ice/name [index]'");
+  {STRING}{LS}?{NDELIM}	expect_error("meta-disk: index missing; either 'internal' or '/dev/ice/name [index]'");
   {NDELIM}		expect_error("either 'internal' or '/dev/ice/name [index]'");
 }
 
@@ -187,12 +191,13 @@
 }
 
 <LBRACE>{
-  {WSC}*\{{WSC}*	update_lcnt(); yy_pop_state();
-  {WSC}*[^{ \t\n]+	expect_error("'{'");
+  {WS}			update_lcnt();
+  \{			update_lcnt(); yy_pop_state();
+  [^{ \t\n]{1,40}	expect_error("'{'");
 }
 
 <IGNORE_SECTION>{
-  [^{}]+		update_lcnt(); /* no ECHO */
+  [^{}]			update_lcnt(); /* no ECHO */
   \{			yy_push_state(IGNORE_SECTION);
 }
 

From www-data at garcon.linbit.com  Mon May 30 19:07:34 2005
From: www-data at garcon.linbit.com (www-data)
Date: Mon May 30 19:07:40 2005
Subject: [DRBD-cvs] r1805 - branches/drbd-0.7
Message-ID: <20050530170739.ED31815F2E@mail.linbit.com>

Author: lars
Date: 2005-05-30 19:07:34 +0200 (Mon, 30 May 2005)
New Revision: 1805

Modified:
   branches/drbd-0.7/Makefile
Log:
* missing parts of Makefile update


Modified: branches/drbd-0.7/Makefile
===================================================================
--- branches/drbd-0.7/Makefile	2005-05-30 17:00:13 UTC (rev 1804)
+++ branches/drbd-0.7/Makefile	2005-05-30 17:07:34 UTC (rev 1805)
@@ -127,7 +127,7 @@
 	@ svn info >/dev/null || { echo "you need a svn checkout to do this." ; false ; }
 	@find $$(svn st -v | sed '/^?/d;s/^.\{8\} \+[0-9]\+ \+[0-9]\+ [a-z]\+ *//;$(if $(PRESERVE_DEBIAN),,/^debian/d)' ) \
 	\! -type d -maxdepth 0 |\
-	sed 's:^:drbd-$(DIST_VERSION)/:' > .filelist
+	sed 's#^#drbd-$(DIST_VERSION)/#' > .filelist
 	@[ -s .filelist ] # assert there is something in .filelist now
 	@find documentation -name "[^.]*.[58]" -o -name "*.html" | \
 	sed "s/^/drbd-$(DIST_VERSION)\//" >> .filelist           ;\
@@ -166,7 +166,9 @@
 	$(MAKE) tarball
 	$(MAKE) tarball PRESERVE_DEBIAN=1
 
-tarball: check_all_committed distclean doc .filelist tgz
+tarball: check_all_committed distclean doc .filelist
+	$(MAKE) tgz
+
 all tools doc .filelist: drbd/drbd_buildtag.c
 
 KDIR := $(shell echo /lib/modules/`uname -r`/build)

