Bug 202645

Summary: btrfs-progs v5.3: fails [TEST/mkfs] 017-small-backing-size-thin-provision-device (ppc64)
Product: File System Reporter: Erhard F. (erhard_f)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: RESOLVED CODE_FIX    
Severity: normal CC: lakshmipathi.g
Priority: P1    
Hardware: PPC-64   
OS: Linux   
Kernel Version: 5.3.7 Subsystem:
Regression: No Bisected commit-id:
Attachments: emerge --info
mkfs-test-results.txt
misc-test-results.txt
fuzz-test-results.txt
misc-test-results.txt
mkfs-test-results.txt
config.log
build.log
misc-test-results (5.1.1, 029-send-p-different-mountpoints)

Description Erhard F. 2019-02-22 13:26:44 UTC
Created attachment 281281 [details]
emerge --info

Tests were run on a Talos II, Gentoo Linux ppc64, Big Endian.

[...]
    [TEST/mkfs]   017-small-backing-size-thin-provision-device
failed: dmsetup create btrfs-progs-thin-pool --table 0 2048 thin-pool /dev/mapper/btrfs-progs-thin-meta /dev/mapper/btrfs-progs-thin-data 1024 200
test failed for case 017-small-backing-size-thin-provision-device
make: *** [Makefile:352: test-mkfs] Fehler 1

    [TEST/fuzz]   003-multi-check-unmounted
/root/build/btrfs-progs-v4.20.1/tests//common: line 177: 30761 Aborted                 (core dumped) $INSTRUMENT "$@" >> "$RESULTS" 2>&1
mayfail: returned code 134 (SIGABRT), not ignored
test failed for case 003-multi-check-unmounted

    [TEST/fuzz]   009-simple-zero-log
/root/build/btrfs-progs-v4.20.1/tests//common: line 177:  2067 Aborted                 (core dumped) $INSTRUMENT "$@" >> "$RESULTS" 2>&1
mayfail: returned code 134 (SIGABRT), not ignored
test failed for case 009-simple-zero-log

    [TEST/misc]   019-receive-clones-on-mounted-subvol
Failed prerequisites: /root/build/btrfs-progs-v4.20.1/fssum
test failed for case 019-receive-clones-on-mounted-subvol
Comment 1 Erhard F. 2019-02-22 13:29:17 UTC
Created attachment 281283 [details]
mkfs-test-results.txt
Comment 2 Erhard F. 2019-02-22 13:29:40 UTC
Created attachment 281285 [details]
misc-test-results.txt
Comment 3 Erhard F. 2019-02-22 13:29:58 UTC
Created attachment 281287 [details]
fuzz-test-results.txt
Comment 4 Erhard F. 2019-06-11 22:10:01 UTC
v5.1 improved over v4.20.1 as 

    [TEST/fuzz]   003-multi-check-unmounted
    [TEST/fuzz]   009-simple-zero-log

pass now on ppc64. 017-small-backing-size-thin-provision-device and 019-receive-clones-on-mounted-subvol still fail:

 # TEST=017\* ./mkfs-tests.sh 
    [TEST/mkfs]   017-small-backing-size-thin-provision-device
failed: dmsetup create btrfs-progs-thin-meta --table 0 4096 linear /dev/loop2 0
test failed for case 017-small-backing-size-thin-provision-device

 # TEST=019\* ./misc-tests.sh 
    [TEST/misc]   019-receive-clones-on-mounted-subvol
Failed prerequisites: /root/build/btrfs-progs-v5.1/fssum
test failed for case 019-receive-clones-on-mounted-subvol
Comment 5 Erhard F. 2019-06-11 22:12:29 UTC
Created attachment 283201 [details]
misc-test-results.txt
Comment 6 Erhard F. 2019-06-11 22:12:59 UTC
Created attachment 283203 [details]
mkfs-test-results.txt
Comment 7 Erhard F. 2019-06-11 22:13:25 UTC
Created attachment 283205 [details]
config.log
Comment 8 Erhard F. 2019-06-11 22:13:42 UTC
Created attachment 283207 [details]
build.log
Comment 9 Erhard F. 2019-06-15 11:14:24 UTC
btrfs-progs-v5.1.1 additionally fails [TEST/misc] 029-send-p-different-mountpoints. This is a regression over btrfs-progs-v5.1, where 029-send-p-different-mountpoints passes.
Comment 10 Erhard F. 2019-06-15 11:15:43 UTC
Created attachment 283277 [details]
misc-test-results (5.1.1, 029-send-p-different-mountpoints)
Comment 11 lakshmipathi 2019-06-15 16:16:00 UTC
My test run also reports  "017-small-backing-size-thin-provision-device" failure https://gitlab.com/giis/btrfs-progs/-/jobs/230609519
Comment 12 Erhard F. 2019-10-21 22:00:58 UTC
Re-test with kernel 5.3.7 and btrfs-progs v5.3.

Only test failing now is

    [TEST/mkfs]   017-small-backing-size-thin-provision-device
failed: dmsetup create btrfs-progs-thin-pool --table 0 2048 thin-pool /dev/mapper/btrfs-progs-thin-meta /dev/mapper/btrfs-progs-thin-data 1024 200
[...]
[10934.699945] device-mapper: table: 253:2: thin-pool: unknown target type
[10934.699984] device-mapper: ioctl: error adding target to table

For 019-receive-clones-on-mounted-subvol to pass you simply need to build an additional utility with 'make fssum'. The error messages of the recent btrfs testsuite states that more clearly.
Comment 13 Erhard F. 2019-12-18 23:40:29 UTC
I got the hint that test "017-small-backing-size-thin-provision-device" needs DM_THIN_PROVISIONING enabled in the kernel .config. If enabled the test passes. For more info see: https://github.com/kdave/btrfs-progs/issues/192

Also in upstream btrfs there are patches now to skip this test if DM_THIN_PROVISIONING is not enabled in kernel .config:
https://lore.kernel.org/linux-btrfs/20191217203155.24206-1-marcos.souza.org@gmail.com/T/#m2b738b69ad633f7948f19b5e985610c93cd986e9