Skip to content

Instantly share code, notes, and snippets.

@mcgrof
Last active April 20, 2022 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcgrof/81771a86ef0b90152e142e597d5f4147 to your computer and use it in GitHub Desktop.
Save mcgrof/81771a86ef0b90152e142e597d5f4147 to your computer and use it in GitHub Desktop.
fstests btrfs/132 generic/226 generic/416 fails with a failure rate of about 1/60 on v5.17-rc7 on a qemu ZNS drive
btrfs/132 generic/226 generic/416 all fail due to the tests using less
the requirement number of zones for a btrfs filesystem. A btrfs
filesystem requires 5 zones:
* 2 zones for the primary superblock
* 1 zone for the system block group
* 1 zone for a metadata block group
* 1 zone for a data block group
The error message however needs to be fixed to actually
spell out the reason why it fails, today it spits out something
which makes no sense:
Zoned: /dev/nvme5n1: host-managed device detected, setting zoned feature
mount /dev/nvme5n1 /media/scratch failed
vagrant@linux517-btrfs-simple-zns ~ $ cat /var/lib/xfstests/results/linux517-btrfs-simple-zns/5.17.0-rc7/btrfs_simple_zns/generic/226.full
ERROR: size 268435456 is too small to make a usable filesystem
ERROR: minimum size for a zoned btrfs filesystem is 47185920
btrfs-progs v5.16.2
See http://btrfs.wiki.kernel.org for more information.
Zoned: /dev/nvme5n1: host-managed device detected, setting zoned feature
mount /dev/nvme5n1 /media/scratch failed
vagrant@linux517-btrfs-simple-zns ~ $ cat /var/lib/xfstests/results/linux517-btrfs-simple-zns/5.17.0-rc7/btrfs_simple_zns/generic/416.full
ERROR: size 134217728 is too small to make a usable filesystem
ERROR: minimum size for a zoned btrfs filesystem is 47185920
btrfs-progs v5.16.2
See http://btrfs.wiki.kernel.org for more information.
Zoned: /dev/nvme5n1: host-managed device detected, setting zoned feature
mount /dev/nvme5n1 /media/scratch failed
vagrant@linux517-btrfs-simple-zns ~ $ sudo fdisk -l /dev/nvme5n1
Disk /dev/nvme5n1: 100 GiB, 107374182400 bytes, 26214400 sectors
Disk model: QEMU NVMe Ctrl
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
On the kdevops front:
mcgrof@bgt-140510-bm04 /data1/linux517-btrfs/kdevops (git::master)$ grep CONFIG_QEMU_NVME_ZONE .config
CONFIG_QEMU_NVME_ZONE_DRIVE_SIZE=102400
CONFIG_QEMU_NVME_ZONE_ZASL=0
CONFIG_QEMU_NVME_ZONE_SIZE="128M"
CONFIG_QEMU_NVME_ZONE_CAPACITY=0
CONFIG_QEMU_NVME_ZONE_MAX_ACTIVE=0
CONFIG_QEMU_NVME_ZONE_MAX_OPEN=0
CONFIG_QEMU_NVME_ZONE_PHYSICAL_BLOCKSIZE=4096
CONFIG_QEMU_NVME_ZONE_LOGICAL_BLOCKSIZE=4096
mcgrof@bgt-140510-bm04 /data1/linux517-btrfs/kdevops (git::master)$ grep ZNS .config
CONFIG_QEMU_ENABLE_NVME_ZNS=y
CONFIG_QEMU_CUSTOM_NVME_ZNS=y
CONFIG_VAGRANT_ENABLE_ZNS=y
CONFIG_FSTESTS_BTRFS_SECTION_SIMPLE_ZNS=y
CONFIG_FSTESTS_TEST_DEV_ZNS="/dev/nvme4n1"
CONFIG_FSTESTS_SCRATCH_DEV_POOL_ZNS="/dev/nvme5n1 /dev/nvme6n1 /dev/nvme7n1 /dev/nvme8n1 /dev/nvme9n1 /dev/nvme10n1 /dev/nvme11n1 /dev/nvme12n1"
--------------
Trying to use the mkfs.btrfs from 5.16.2-1 fails too, and so
e0038321f131df1a1bfe4665bb3ecff1af0edcd7 /home/vagrant/mkfs.btrfs
root@linux517-btrfs-simple-zns-dev /var/lib/xfstests # export MKFS_BTRFS_PROG=/home/vagrant/mkfs.btrfs
root@linux517-btrfs-simple-zns-dev /var/lib/xfstests # ./check -s btrfs_simple_zns btrfs/132
SECTION -- btrfs_simple_zns
FSTYP -- btrfs
PLATFORM -- Linux/x86_64 linux517-btrfs-simple-zns-dev 5.17.0-rc7 #1 SMP PREEMPT Fri Mar 25 02:36:50 UTC 2022
MKFS_OPTIONS -- -f -d single -m single /dev/nvme5n1
MOUNT_OPTIONS -- /dev/nvme5n1 /media/scratch
btrfs/132 [failed, exit status 1]- output mismatch (see /var/lib/xfstests/results/linux517-btrfs-simple-zns-dev/5.17.0-rc7/btrfs_simple_zns/btrfs/132.out.bad)
--- tests/btrfs/132.out 2022-03-31 16:27:39.552477698 +0000
+++ /var/lib/xfstests/results/linux517-btrfs-simple-zns-dev/5.17.0-rc7/btrfs_simple_zns/btrfs/132.out.bad 2022-04-20 21:45:36.991403393 +0000
@@ -1,2 +1,5 @@
QA output created by 132
-Silence is golden
+mount: /media/scratch: wrong fs type, bad option, bad superblock on /dev/nvme5n1, missing codepage or helper program, or other error.
+ dmesg(1) may have more information after failed mount system call.
+mount /dev/nvme5n1 /media/scratch failed
+(see /var/lib/xfstests/results/linux517-btrfs-simple-zns-dev/5.17.0-rc7/btrfs_simple_zns/btrfs/132.full for details)
...
(Run 'diff -u /var/lib/xfstests/tests/btrfs/132.out /var/lib/xfstests/results/linux517-btrfs-simple-zns-dev/5.17.0-rc7/btrfs_simple_zns/btrfs/132.out.bad' to see the entire diff)
Ran: btrfs/132
Failures: btrfs/132
Failed 1 of 1 tests
SECTION -- btrfs_simple_zns
=========================
Ran: btrfs/132
Failures: btrfs/132
Failed 1 of 1 tests
root@linux517-btrfs-simple-zns-dev /var/lib/xfstests # dpkg -l | egrep "linux-vdso|libuuid|libblkid|libudev|libpthread|libc6"
ii libblkid-dev:amd64 2.38-4 amd64 block device ID library - headers
ii libblkid1:amd64 2.38-4 amd64 block device ID library
ii libc6:amd64 2.33-7 amd64 GNU C Library: Shared libraries
ii libc6-dev:amd64 2.33-7 amd64 GNU C Library: Development Libraries and Header Files
ii libudev-dev:amd64 250.4-1 amd64 libudev development files
ii libudev1:amd64 250.4-1 amd64 libudev shared library
ii libuuid1:amd64 2.38-4 amd64 Universally Unique ID library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment