scoutfs-utils: mkfs requires 16 segments

mkfs needs to make sure that a device is large enough for a file system.
We had a tiny limit that almost certainly wouldn't have worked.
Increase the limit to a still absurdly small but arguably possible 16
segments.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2018-06-29 14:42:08 -07:00
committed by Zach Brown
parent 35e4ab92f0
commit 98d06c7a6b
+2 -2
View File
@@ -193,8 +193,8 @@ static int write_new_fs(char *path, int fd)
goto out;
}
/* require space for one segment */
limit = SCOUTFS_SEGMENT_SIZE * 2;
/* arbitrarily require space for a handful of segments */
limit = SCOUTFS_SEGMENT_SIZE * 16;
if (size < limit) {
fprintf(stderr, "%llu byte device too small for min %llu byte fs\n",
size, limit);