]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - bitmap.c
Some fixes to the mapfile code.
[thirdparty/mdadm.git] / bitmap.c
index beef2dcdbb3d558ad5c81da1d16ce6b6774006ca..44a86773ddfef02a8530c60b60532a3e87f42f05 100644 (file)
--- a/bitmap.c
+++ b/bitmap.c
@@ -373,7 +373,7 @@ int CreateBitmap(char *filename, int force, char uuid[16],
                 */
                chunksize = DEFAULT_BITMAP_CHUNK;
                /* <<20 for 2^20 chunks, >>9 to convert bytes to sectors */
-               while (array_size > (chunksize << (20-9)))
+               while (array_size > ((unsigned long long)chunksize << (20-9)))
                        chunksize <<= 1;
        }