[DRBD-cvs] r1681 - branches/drbd-0.7/drbd

svn at svn.drbd.org svn at svn.drbd.org
Wed Dec 15 16:43:53 CET 2004


Author: phil
Date: 2004-12-15 16:43:51 +0100 (Wed, 15 Dec 2004)
New Revision: 1681

Modified:
   branches/drbd-0.7/drbd/drbd_int.h
Log:
Well one day after the 0.7.7 release and again an important
bug fix :(

 On 32Bit systems with CONFIG_LBD set, DRBD fails to calculate
 the right sectornumber from the bitnumber. Only affects devices
 bigger than 2 TB.

 Symptom: If you do a resync and suddenly the progress of the 
          resync stops, (or it never moves at all), but you can 
          see that DRBD gereates IO.
          After the expected resync time IO stops, but the
          progress indicator is still at its position.

DRBD simply resynced the wrong blocks, and since no bit
in the bitmap were cleared, no progress of the resync.



Modified: branches/drbd-0.7/drbd/drbd_int.h
===================================================================
--- branches/drbd-0.7/drbd/drbd_int.h	2004-12-14 15:02:38 UTC (rev 1680)
+++ branches/drbd-0.7/drbd/drbd_int.h	2004-12-15 15:43:51 UTC (rev 1681)
@@ -936,7 +936,7 @@
 
 /* thus many _storage_ sectors are described by one bit */
 #define BM_SECT_TO_BIT(x)   ((x)>>(BM_BLOCK_SIZE_B-9))
-#define BM_BIT_TO_SECT(x)   ((x)<<(BM_BLOCK_SIZE_B-9))
+#define BM_BIT_TO_SECT(x)   ((sector_t)(x)<<(BM_BLOCK_SIZE_B-9))
 #define BM_SECT_PER_BIT     BM_BIT_TO_SECT(1)
 
 /* bit to represented kilo byte conversion */



More information about the drbd-cvs mailing list