diff mbox series

[1/2] btrfs-progs: print out the correct minimum size for zoned file systems

Message ID 8acbb798193016e630019e29212c2343e2920e84.1688648758.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: some zoned mkfs fixups | expand

Commit Message

Josef Bacik July 6, 2023, 1:06 p.m. UTC
While trying to get the ZNS testing running I ran into a problem with
making a small file system for one of the tests, but the error output
didn't make sense because it said the minimum size was 114294784 bytes,
and I was trying to make a file system of size 419430400 bytes.  The
problem here is that we were spitting out min_dev_size, which isn't the
minimum size for the ZNS configuration.  Fix the output to match the
actual size limit.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig July 6, 2023, 2:30 p.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/mkfs/main.c b/mkfs/main.c
index 972ed111..e61ea959 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1446,7 +1446,7 @@  int BOX_MAIN(mkfs)(int argc, char **argv)
 		error("size %llu is too small to make a usable filesystem",
 			block_count);
 		error("minimum size for a zoned btrfs filesystem is %llu",
-			min_dev_size);
+			5 * zone_size(file));
 		goto error;
 	}