[DRBD-cvs] drbd by lars; unsigned long != sector_t

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Tue, 27 Apr 2004 15:49:28 +0200 (CEST)


DRBD CVS committal

Author  : lars
Module  : drbd

Dir     : drbd/drbd


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


Log Message:
unsigned long != sector_t
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_int.h,v
retrieving revision 1.58.2.146
retrieving revision 1.58.2.147
diff -u -3 -r1.58.2.146 -r1.58.2.147
--- drbd_int.h	24 Apr 2004 16:35:21 -0000	1.58.2.146
+++ drbd_int.h	27 Apr 2004 13:49:23 -0000	1.58.2.147
@@ -133,6 +133,8 @@
 #define DUMPLX(A)  ERR( #A " = %lx in %s:%d\n", (A),__FILE__,__LINE__);
 #define DUMPI(A)   ERR( #A " = %d in %s:%d\n",  (A),__FILE__,__LINE__);
 
+#define DUMPST(A) DUMPLLU((unsigned long long)(A))
+
 
 // Info: do not remove the spaces around the "," before ##
 //       Otherwise this is not portable from gcc-2.95 to gcc-3.3
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_main.c,v
retrieving revision 1.73.2.155
retrieving revision 1.73.2.156
diff -u -3 -r1.73.2.155 -r1.73.2.156
--- drbd_main.c	26 Apr 2004 16:24:13 -0000	1.73.2.155
+++ drbd_main.c	27 Apr 2004 13:49:23 -0000	1.73.2.156
@@ -1756,11 +1756,11 @@
 	if(bit) {
 		for(bnr=sbnr; bnr <= ebnr; bnr++) {
 			ERR_IF((bnr>>3) >= sbm->size) {
-				DUMPLU(sector);
+				DUMPST(sector);
 				DUMPI(size);
 				DUMPLU(bnr);
 				DUMPLU(sbm->size);
-				DUMPLU(sbm->dev_size);
+				DUMPST(sbm->dev_size);
 				break;
 			}
 			if(!test_bit(bnr&BPLM,bm+(bnr>>LN2_BPL))) ret+=BM_NS;
@@ -1781,11 +1781,11 @@
 			if(unlikely(dev_size<<1 == esector+1)) {
 				ebnr++;
 				ERR_IF((ebnr>>3) >= sbm->size) {
-					DUMPLU(sector);
+					DUMPST(sector);
 					DUMPI(size);
 					DUMPLU(ebnr);
 					DUMPLU(sbm->size);
-					DUMPLU(sbm->dev_size);
+					DUMPST(sbm->dev_size);
 				} else if(test_bit(ebnr&BPLM,bm+(ebnr>>LN2_BPL))) {
 					ret = (esector-sector+1)-BM_NS;
 				}
@@ -1794,13 +1794,13 @@
 
 		for(bnr=sbnr; bnr <= ebnr; bnr++) {
 			ERR_IF((bnr>>3) >= sbm->size) {
-				DUMPLU(sector);
+				DUMPST(sector);
 				DUMPI(size);
 				DUMPLU(bnr);
 				DUMPLU(sbnr);
 				DUMPLU(ebnr);
 				DUMPLU(sbm->size);
-				DUMPLU(sbm->dev_size);
+				DUMPST(sbm->dev_size);
 				break;
 			}
 			if(test_bit(bnr&BPLM,bm+(bnr>>LN2_BPL))) ret+=BM_NS;