[DRBD-cvs] drbd by phil; [patch by LGE] Comments, cleanups

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Tue, 6 Jul 2004 21:12:38 +0200 (CEST)


DRBD CVS committal

Author  : phil
Module  : drbd

Dir     : drbd/drbd


Modified Files:
      Tag: rel-0_7-branch
	drbd_bitmap.c 


Log Message:
[patch by LGE] Comments, cleanups

===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_bitmap.c,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -3 -r1.1.2.11 -r1.1.2.12
--- drbd_bitmap.c	6 Jul 2004 19:09:18 -0000	1.1.2.11
+++ drbd_bitmap.c	6 Jul 2004 19:12:33 -0000	1.1.2.12
@@ -418,6 +418,11 @@
 		*bm++ = word;
 		b->bm_set += hweight_long(word) - bits;
 	}
+	/* with 32bit <-> 64bit cross-platform connect
+	 * this is only correct for current usage,
+	 * where we _know_ that we are 64 bit aligned,
+	 * and know that this function is used in this way, too...
+	 */
 	if (offset+number == b->bm_words) {
 		b->bm_set -= bm_clear_surplus(b);
 	}
@@ -451,6 +456,11 @@
 		*bm++ = word;
 		b->bm_set += hweight_long(word) - bits;
 	}
+	/* with 32bit <-> 64bit cross-platform connect
+	 * this is only correct for current usage,
+	 * where we _know_ that we are 64 bit aligned,
+	 * and know that this function is used in this way, too...
+	 */
 	if (offset+number == b->bm_words) {
 		b->bm_set -= bm_clear_surplus(b);
 	}
@@ -670,9 +680,9 @@
 
 	spin_lock_irq(&b->bm_lock);
 	BM_PARANOIA_CHECK();
-	if (b->bm_fo < b->bm_bits)
+	if (b->bm_fo < b->bm_bits) {
 		i = find_next_bit(b->bm,b->bm_bits,b->bm_fo);
-	else if (b->bm_fo > b->bm_bits) {
+	} else if (b->bm_fo > b->bm_bits) {
 		ERR("bm_fo=%lu bm_bits=%lu\n",b->bm_fo, b->bm_bits);
 	}
 	if (i >= b->bm_bits) {