We should allocate memory for the storage-bitmap at create-time, not
load time.
Signed-off-by: NeilBrown <neilb@suse.de>
goto err;
}
- ret = bitmap_storage_alloc(&bitmap->storage, bitmap->chunks,
- !bitmap->mddev->bitmap_info.external);
- if (ret)
- goto err;
-
oldindex = ~0L;
offset = 0;
if (!bitmap->mddev->bitmap_info.external)
if (!bitmap->bp)
goto error;
+ if (file || mddev->bitmap_info.offset) {
+ err = bitmap_storage_alloc(&bitmap->storage, bitmap->chunks,
+ !mddev->bitmap_info.external);
+ if (err)
+ goto error;
+ }
printk(KERN_INFO "created bitmap (%lu pages) for device %s\n",
pages, bmname(bitmap));