|
@@ -2058,6 +2058,11 @@ int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
|
|
|
long pages;
|
|
long pages;
|
|
|
struct bitmap_page *new_bp;
|
|
struct bitmap_page *new_bp;
|
|
|
|
|
|
|
|
|
|
+ if (bitmap->storage.file && !init) {
|
|
|
|
|
+ pr_info("md: cannot resize file-based bitmap\n");
|
|
|
|
|
+ return -EINVAL;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (chunksize == 0) {
|
|
if (chunksize == 0) {
|
|
|
/* If there is enough space, leave the chunk size unchanged,
|
|
/* If there is enough space, leave the chunk size unchanged,
|
|
|
* else increase by factor of two until there is enough space.
|
|
* else increase by factor of two until there is enough space.
|