common: notrun in mkfs_dev for too small zoned file systems
authorChristoph Hellwig <hch@lst.de>
Wed, 22 Jan 2025 04:48:19 +0000 (05:48 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 8 Apr 2025 06:48:26 +0000 (08:48 +0200)
Similar to the regular scratch_mkfs, skip the test if the file system
would be so small that there's not enough zones.

Signed-off-by: Christoph Hellwig <hch@lst.de>
common/rc

index 707c563c539f3e7b92d91603a5e212c43caeb5de..bf7adf318fbaa21301513b4c8cba3f770d437319 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -906,6 +906,10 @@ _mkfs_dev()
 {
     local tmp=`mktemp -u`
     if ! _try_mkfs_dev "$@" 2>$tmp.mkfserr 1>$tmp.mkfsstd; then
+       grep -q "must be greater than the minimum" $tmp.mkfserr && \
+               _notrun "Zone count too small"
+       grep -q "too small for zoned allocator" $tmp.mkfserr && \
+               _notrun "Zone count too small"
        # output stored mkfs output
        cat $tmp.mkfserr >&2
        cat $tmp.mkfsstd