--- ./drivers/md/bitmap.c.orig 2006-09-21 16:10:17.000000000 -0400 +++ ./drivers/md/bitmap.c 2006-09-21 16:12:16.000000000 -0400 @@ -1578,8 +1578,7 @@ int bitmap_create(mddev_t *mddev) if (err) goto error; - bitmap->chunkshift = find_first_bit(&bitmap->chunksize, - sizeof(bitmap->chunksize)); + bitmap->chunkshift = ffs(bitmap->chunksize) - 1; /* now that chunksize and chunkshift are set, we can use these macros */ chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) /