[DRBD-cvs] drbd by phil; Made one of the noisy messages go away.

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Thu, 6 May 2004 14:44:15 +0200 (CEST)


DRBD CVS committal

Author  : phil
Module  : drbd

Dir     : drbd/drbd


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


Log Message:
Made one of the noisy messages go away.

===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_actlog.c,v
retrieving revision 1.1.2.98
retrieving revision 1.1.2.99
diff -u -3 -r1.1.2.98 -r1.1.2.99
--- drbd_actlog.c	5 May 2004 17:07:02 -0000	1.1.2.98
+++ drbd_actlog.c	6 May 2004 12:44:10 -0000	1.1.2.99
@@ -841,7 +841,6 @@
 	for(i=0;i<mdev->resync->nr_elements;i++) {
 		bm_ext = (struct bm_extent*) lc_entry(mdev->resync,i);
 		if(bm_ext->lce.lc_number == LC_FREE) continue;
-		atomic_sub(bm_ext->lce.refcnt,&mdev->rs_pending_cnt);
 		bm_ext->lce.refcnt = 0; // Rude but ok.
 		bm_ext->rs_left = 0;
 		clear_bit(BME_LOCKED,&bm_ext->flags);
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v
retrieving revision 1.97.2.145
retrieving revision 1.97.2.146
diff -u -3 -r1.97.2.145 -r1.97.2.146
--- drbd_receiver.c	6 May 2004 11:53:00 -0000	1.97.2.145
+++ drbd_receiver.c	6 May 2004 12:44:10 -0000	1.97.2.146
@@ -1505,10 +1505,17 @@
 		atomic_set(&mdev->unacked_cnt,0);
 	}
 
-	if(atomic_read(&mdev->rs_pending_cnt)) {
-		ERR("rs_pending_cnt = %d\n",atomic_read(&mdev->rs_pending_cnt));
-		atomic_set(&mdev->rs_pending_cnt,0);
-	}
+	/* We do not have data structures that would allow us to 
+	   get the rs_pending_cnt down to 0 again.
+	   * On SyncTarget we do not have any data structures describing 
+	     the pending RSDataRequest's we have sent.
+	   * On SyncSource there is no data structure that tracks
+	     the RSDataReply blocks that we sent to the SyncTarget.
+	   And no, it is not the sum of the reference counts in the 
+	   resync_LRU. The resync_LRU tracks the whole operation including
+           the disk-IO, while the rs_pending_cnt only tracks the blocks 
+	   on the fly. */
+	atomic_set(&mdev->rs_pending_cnt,0);
 
 	ERR_IF(atomic_read(&mdev->ap_pending_cnt))
 		atomic_set(&mdev->ap_pending_cnt,0);