|
@@ -1444,8 +1444,7 @@ int bitmap_create(mddev_t *mddev)
|
|
|
if (err)
|
|
if (err)
|
|
|
goto error;
|
|
goto error;
|
|
|
|
|
|
|
|
- bitmap->chunkshift = find_first_bit(&bitmap->chunksize,
|
|
|
|
|
- sizeof(bitmap->chunksize));
|
|
|
|
|
|
|
+ bitmap->chunkshift = ffz(~bitmap->chunksize);
|
|
|
|
|
|
|
|
/* now that chunksize and chunkshift are set, we can use these macros */
|
|
/* now that chunksize and chunkshift are set, we can use these macros */
|
|
|
chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) /
|
|
chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) /
|