Message ID | 1351208337-3455-1-git-send-email-zimilo@code-trick.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/utils.c b/utils.c index 205e667..7ba746e 100644 --- a/utils.c +++ b/utils.c @@ -557,6 +557,12 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret, } if (max_block_count) block_count = min(block_count, max_block_count); + + if (block_count < 2 * 1024 * 1024) { + fprintf(stderr, "size of %s is too small(less than 2Mb)\n", file); + exit(1); + } + zero_end = 1; if (block_count < 1024 * 1024 * 1024 && !(*mixed)) {