Commit da6fb7a9 authored by NeilBrown's avatar NeilBrown
Browse files

md/bitmap: don't pass -1 to bitmap_storage_alloc.

Passing -1 to bitmap_storage_alloc() causes page->index to be set to
-1, which is quite problematic.

So only pass ->cluster_slot if mddev_is_clustered().

Fixes: b97e9257

 ("Use separate bitmaps for each nodes in the cluster")
Cc: (v4.1+)
Signed-off-by: default avatarNeilBrown <>
parent e8ff8bf0
......@@ -1997,7 +1997,8 @@ int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
if (bitmap->mddev->bitmap_info.offset || bitmap->mddev->bitmap_info.file)
ret = bitmap_storage_alloc(&store, chunks,
? bitmap->cluster_slot : 0);
if (ret)
goto err;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment