# There is a long existing bug that btrfs doesn't discard all space for
# above mentioned case.
#
-# The fix is: "btrfs: extent-tree: Ensure we trim ranges across block group
-# boundary"
-#
. ./common/preamble
_begin_fstest auto quick trim fiemap
# Modify as appropriate.
_supported_fs btrfs
+_fixed_by_kernel_commit 6b7faadd985c \
+ "btrfs: Ensure we trim ranges across block group boundary"
+
_require_loop
_require_xfs_io_command "fiemap"
#
# Test if the show_devname() returns sprout device instead of seed device.
#
-# Fixed in kernel patch:
-# btrfs: btrfs_show_devname don't traverse into the seed fsid
. ./common/preamble
_begin_fstest auto quick seed
# real QA test starts here
_supported_fs btrfs
+_fixed_by_kernel_commit 4faf55b03823 \
+ "btrfs: don't traverse into the seed devices in show_devname"
_require_scratch_dev_pool 2
_scratch_dev_pool_get 2
#
# FS QA Test 218
#
-# Regression test for the problem fixed by the patch
-#
-# btrfs: init device stats for seed devices
-#
# Make a seed device, add a sprout to it, and then make sure we can still read
# the device stats for both devices after we remount with the new sprout device.
#
# Modify as appropriate.
_supported_fs btrfs
+_fixed_by_kernel_commit 124604eb50f8 \
+ "btrfs: init device stats for seed devices"
_require_test
_require_scratch_dev_pool 2
# FS QA Test 225
#
# Test for seed device-delete on a sprouted FS.
-# Requires kernel patch
-# b5ddcffa3777 btrfs: fix put of uninitialized kobject after seed device delete
#
# Steps:
# Create a seed FS. Add a RW device to make it sprout FS and then delete
# Modify as appropriate.
_supported_fs btrfs
+_fixed_by_kernel_commit b5ddcffa3777 \
+ "btrfs: fix put of uninitialized kobject after seed device delete"
_require_test
_require_scratch_dev_pool 2
_require_btrfs_forget_or_module_loadable
#
# Check seed device integrity after fstrim on the sprout device.
#
-# Kernel bug is fixed by the commit:
-# btrfs: fix unmountable seed device after fstrim
-
. ./common/preamble
_begin_fstest auto quick seed trim
# Modify as appropriate.
_supported_fs btrfs
+_fixed_by_kernel_commit 5e753a817b2d \
+ "btrfs: fix unmountable seed device after fstrim"
_require_command "$BTRFS_TUNE_PROG" btrfstune
_require_fstrim
_require_scratch_dev_pool 2