[DRBD-cvs] DRBD CVS: drbd by phil from

drbd-cvs@linbit.com drbd-cvs@linbit.com
Mon, 12 Jan 2004 20:50:12 +0100 (CET)


DRBD CVS committal

Author  : phil
Host    : 
Module  : drbd

Dir     : drbd/drbd


Modified Files:
      Tag: rel-0_7-branch
	drbd_actlog.c drbd_int.h drbd_receiver.c 


Log Message:
* Micro makefile fixes
* Fixes for the usual was-never-tested bugs to the last changes in drbd_actlog.c
* Changed return value of drbd_process_ee(), if the function is interrupted
  by a signal from 0 (=fatal) to 2 (= I was interrupted by a signal, do something
  and call me again)
* Be more verbose on the SyncSource side if resynchronisation is paused.
* Made drbdadm to no longer echo each drbdsetup commandline to stderr.    

===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_actlog.c,v
retrieving revision 1.1.2.47
retrieving revision 1.1.2.48
diff -u -3 -r1.1.2.47 -r1.1.2.48
--- drbd_actlog.c	12 Jan 2004 15:03:08 -0000	1.1.2.47
+++ drbd_actlog.c	12 Jan 2004 19:49:41 -0000	1.1.2.48
@@ -67,11 +67,13 @@
 		}
 	}
 	al_ext   = lc_get(mdev->act_log,enr);
-	al_flags = mdev->act_log->flags;
-	if (al_ext->lc_number != enr) {
-		if (!lc_try_lock(mdev->resync))
-			BUG(); // has to be successfull, we have the spinlock!
+	if(al_ext) {
+		if (al_ext->lc_number != enr) {
+			if (!lc_try_lock(mdev->resync))
+				BUG(); // has to be successfull
+		}
 	}
+	al_flags = mdev->act_log->flags;
 	spin_unlock_irq(&mdev->al_lock);
 
 	if (!al_ext) {
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_int.h,v
retrieving revision 1.58.2.83
retrieving revision 1.58.2.84
diff -u -3 -r1.58.2.83 -r1.58.2.84
--- drbd_int.h	12 Jan 2004 10:46:42 -0000	1.58.2.83
+++ drbd_int.h	12 Jan 2004 19:49:41 -0000	1.58.2.84
@@ -763,7 +763,6 @@
 extern void drbd_init_ee(drbd_dev* mdev);
 extern void drbd_put_ee(drbd_dev* mdev,struct Tl_epoch_entry *e);
 extern struct Tl_epoch_entry* drbd_get_ee(drbd_dev* mdev);
-extern int _drbd_process_ee(drbd_dev *,struct list_head *);
 extern int recv_resync_read(drbd_dev* mdev, struct Pending_read *pr,
 			    sector_t sector, int data_size);
 extern int recv_dless_read(drbd_dev* mdev, struct Pending_read *pr,
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v
retrieving revision 1.97.2.75
retrieving revision 1.97.2.76
diff -u -3 -r1.97.2.75 -r1.97.2.76
--- drbd_receiver.c	12 Jan 2004 15:03:08 -0000	1.97.2.75
+++ drbd_receiver.c	12 Jan 2004 19:49:41 -0000	1.97.2.76
@@ -340,6 +340,8 @@
 
 #define GFP_TRY	( __GFP_HIGHMEM )
 
+STATIC int _drbd_process_ee(drbd_dev *mdev,struct list_head *head);
+
 static inline int _get_ee_cond(struct Drbd_Conf* mdev)
 {
 	int av;
@@ -411,7 +413,7 @@
    from this function. Note, this function is called from all three
    threads (receiver, dsender and asender). To ensure this I only allow
    one thread at a time in the body of the function */
-int _drbd_process_ee(drbd_dev *mdev,struct list_head *head)
+STATIC int _drbd_process_ee(drbd_dev *mdev,struct list_head *head)
 {
 	struct Tl_epoch_entry *e;
 	struct list_head *le;
@@ -422,7 +424,7 @@
 	while( test_and_set_bit(PROCESS_EE_RUNNING,&mdev->flags) ) {
 		spin_unlock_irq(&mdev->ee_lock);
 		interruptible_sleep_on(&mdev->ee_wait);
-		if(signal_pending(current)) return 0;
+		if(signal_pending(current)) return 2;
 		spin_lock_irq(&mdev->ee_lock);
 	}
 
@@ -1572,6 +1574,7 @@
 {
 	D_ASSERT(mdev->cstate == SyncSource);
 	set_cstate(mdev,PausedSyncS);
+	INFO("Syncer waits for sync group\n");
 	return TRUE; // cannot fail ?
 }
 
@@ -1579,6 +1582,7 @@
 {
 	D_ASSERT(mdev->cstate == PausedSyncS);
 	set_cstate(mdev,SyncSource);
+	INFO("resumed synchronisation.\n");
 	return TRUE; // cannot fail ?
 }