[DRBD-cvs] r1559 - in branches/drbd-0.7: drbd user
svn at svn.drbd.org
svn at svn.drbd.org
Fri Sep 24 13:13:54 CEST 2004
Author: phil
Date: 2004-09-24 13:13:51 +0200 (Fri, 24 Sep 2004)
New Revision: 1559
Modified:
branches/drbd-0.7/drbd/drbd_int.h
branches/drbd-0.7/user/drbdsetup.c
Log:
Made the "Warnung: comparison is always false due to limited
range of data type" warning go away on 32Bit platforms whe
CONFIG_LBD ist not set.
Modified: branches/drbd-0.7/drbd/drbd_int.h
===================================================================
--- branches/drbd-0.7/drbd/drbd_int.h 2004-09-23 19:03:21 UTC (rev 1558)
+++ branches/drbd-0.7/drbd/drbd_int.h 2004-09-24 11:13:51 UTC (rev 1559)
@@ -968,8 +968,12 @@
#define BM_EXT_PER_SECT ( 512 / BM_BYTES_PER_EXTENT ) // 4
*/
-#define DRBD_MAX_SECTORS \
+#if ( !defined(CONFIG_LBD) ) && ( BITS_PER_LONG == 32 )
+# define DRBD_MAX_SECTORS (0xffffffffLU)
+#else
+# define DRBD_MAX_SECTORS \
( (MD_RESERVED_SIZE*2LL - MD_BM_OFFSET) * (1LL<<(BM_EXT_SIZE_B-9)) )
+#endif
extern int drbd_bm_init (drbd_dev *mdev);
extern int drbd_bm_resize (drbd_dev *mdev, sector_t sectors);
Modified: branches/drbd-0.7/user/drbdsetup.c
===================================================================
--- branches/drbd-0.7/user/drbdsetup.c 2004-09-23 19:03:21 UTC (rev 1558)
+++ branches/drbd-0.7/user/drbdsetup.c 2004-09-24 11:13:51 UTC (rev 1559)
@@ -567,6 +567,7 @@
[MDMounted]="Meta device is already mounted.",
[LDMDInvalid]="Lower device / meta device / index combination invalid.",
[LDDeviceTooLarge]="Currently we only support devices up to 3.998TB.\n"
+ "(up to 2TB in case you do not have CONFIG_LBD set)",
"Contact office at linbit.com, if you need more.",
};
More information about the drbd-cvs
mailing list