Message ID | f09fb4edd69cf42fbb816e806384f79340e9d2b4.1703979415.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fstests: btrfs: remove test case btrfs/131 | expand |
On Sat, Dec 30, 2023 at 6:37 PM Qu Wenruo <wqu@suse.com> wrote: > > Test case btrfs/131 is a quick tests for v1/v2 free space related > behavior, including the mount time conversion and disabling of v2 space > cache. > > However there are two problems, mostly related to the v2 cache clearing. > > - There are some features with hard dependency on v2 free space cache > Including: > * block-group-tree > * extent-tree-v2 > * subpage support > > Note those features may even not support clearing v2 cache. > > - The v1 free space cache is going to be deprecated > Since v5.15 the default mkfs is already going v2 cache instead. > It won't be long before we mark v1 cache deprecated and force to > go v2 cache. > > This makes the test case to fail unnecessarily, the false failure would > only grow with new features relying on v2 cache. > > So here let's removing the test case completely. > Can we pair this change with a corresponding change in btrfs-progs that blocks using v1? I don't think it's actually worth splitting this change up in phases, especially when we're explicitly dropping the tests around it.
On 2024/1/1 00:42, Neal Gompa wrote: > On Sat, Dec 30, 2023 at 6:37 PM Qu Wenruo <wqu@suse.com> wrote: >> >> Test case btrfs/131 is a quick tests for v1/v2 free space related >> behavior, including the mount time conversion and disabling of v2 space >> cache. >> >> However there are two problems, mostly related to the v2 cache clearing. >> >> - There are some features with hard dependency on v2 free space cache >> Including: >> * block-group-tree >> * extent-tree-v2 >> * subpage support >> >> Note those features may even not support clearing v2 cache. >> >> - The v1 free space cache is going to be deprecated >> Since v5.15 the default mkfs is already going v2 cache instead. >> It won't be long before we mark v1 cache deprecated and force to >> go v2 cache. >> >> This makes the test case to fail unnecessarily, the false failure would >> only grow with new features relying on v2 cache. >> >> So here let's removing the test case completely. >> > > Can we pair this change with a corresponding change in btrfs-progs > that blocks using v1? I don't think it's actually worth splitting this > change up in phases, especially when we're explicitly dropping the > tests around it. That sounds pretty reasonable. I'll craft one to deprecate v1 cache in progs too. Thanks, Qu > >
On Sun, Dec 31, 2023 at 5:14 PM Qu Wenruo <wqu@suse.com> wrote: > > > > On 2024/1/1 00:42, Neal Gompa wrote: > > On Sat, Dec 30, 2023 at 6:37 PM Qu Wenruo <wqu@suse.com> wrote: > >> > >> Test case btrfs/131 is a quick tests for v1/v2 free space related > >> behavior, including the mount time conversion and disabling of v2 space > >> cache. > >> > >> However there are two problems, mostly related to the v2 cache clearing. > >> > >> - There are some features with hard dependency on v2 free space cache > >> Including: > >> * block-group-tree > >> * extent-tree-v2 > >> * subpage support > >> > >> Note those features may even not support clearing v2 cache. > >> > >> - The v1 free space cache is going to be deprecated > >> Since v5.15 the default mkfs is already going v2 cache instead. > >> It won't be long before we mark v1 cache deprecated and force to > >> go v2 cache. > >> > >> This makes the test case to fail unnecessarily, the false failure would > >> only grow with new features relying on v2 cache. > >> > >> So here let's removing the test case completely. > >> > > > > Can we pair this change with a corresponding change in btrfs-progs > > that blocks using v1? I don't think it's actually worth splitting this > > change up in phases, especially when we're explicitly dropping the > > tests around it. > > That sounds pretty reasonable. > > I'll craft one to deprecate v1 cache in progs too. > As part of the deprecation, it should probably be difficult to use v1 cache and if we're not already automatically migrating people to v2, we should probably start doing that.
diff --git a/tests/btrfs/131 b/tests/btrfs/131 deleted file mode 100755 index 1e072b285ecf..000000000000 --- a/tests/btrfs/131 +++ /dev/null @@ -1,124 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: GPL-2.0 -# Copyright (c) 2016 Facebook. All Rights Reserved. -# -# FS QA Test 131 -# -# Test free space tree mount options. -# -. ./common/preamble -_begin_fstest auto quick - -# Import common functions. -. ./common/filter - -# real QA test starts here - -_supported_fs btrfs -_require_scratch -_require_btrfs_command inspect-internal dump-super -_require_btrfs_fs_feature free_space_tree -# Zoned btrfs does not support space_cache(v1) -_require_non_zoned_device "${SCRATCH_DEV}" - -mkfs_v1() -{ - _scratch_mkfs >/dev/null 2>&1 - # Future proof against btrfs-progs making space_cache=v2 filesystems by - # default. - _scratch_mount -o clear_cache,space_cache=v1 - _scratch_unmount -} - -mkfs_v2() -{ - _scratch_mkfs >/dev/null 2>&1 - _scratch_mount -o space_cache=v2 - _scratch_unmount -} - -check_fst_compat() -{ - compat_ro="$($BTRFS_UTIL_PROG inspect-internal dump-super "$SCRATCH_DEV" | \ - sed -rn 's/^compat_ro_flags\s+(.*)$/\1/p')" - if ((compat_ro & 0x1)); then - echo "free space tree is enabled" - else - echo "free space tree is disabled" - fi -} - -# Mount options might interfere. -export MOUNT_OPTIONS="" - -# When the free space tree is not enabled: -# -o space_cache=v1: keep using the old free space cache -# -o space_cache=v2: enable the free space tree -# -o clear_cache,space_cache=v2: clear the free space cache and enable the free space tree -# We don't check the no options case or plain space_cache as that will change -# in the future to turn on space_cache=v2. - -mkfs_v1 -echo "Using free space cache" -_scratch_mount -o space_cache=v1 -check_fst_compat -_scratch_unmount - -mkfs_v1 -echo "Enabling free space tree" -_scratch_mount -o space_cache=v2 -check_fst_compat -_scratch_unmount - -mkfs_v1 -echo "Disabling free space cache and enabling free space tree" -_scratch_mount -o clear_cache,space_cache=v2 -check_fst_compat -_scratch_unmount - -# When the free space tree is enabled: -# -o nospace_cache, -o space_cache=v1: error -# no options, -o space_cache=v2: keep using the free space tree -# -o clear_cache, -o clear_cache,space_cache=v2: clear and recreate the free space tree -# -o clear_cache,nospace_cache: clear the free space tree -# -o clear_cache,space_cache=v1: clear the free space tree, enable the free space cache - -mkfs_v2 -echo "Trying to mount without free space tree" -_try_scratch_mount -o nospace_cache >/dev/null 2>&1 || echo "mount failed" -_try_scratch_mount -o space_cache=v1 >/dev/null 2>&1 || echo "mount failed" - -mkfs_v2 -echo "Mounting existing free space tree" -_scratch_mount -check_fst_compat -_scratch_unmount -_scratch_mount -o space_cache=v2 -check_fst_compat -_scratch_unmount - -mkfs_v2 -echo "Recreating free space tree" -_scratch_mount -o clear_cache,space_cache=v2 -check_fst_compat -_scratch_unmount -mkfs_v2 -_scratch_mount -o clear_cache -check_fst_compat -_scratch_unmount - -mkfs_v2 -echo "Disabling free space tree" -_scratch_mount -o clear_cache,nospace_cache -check_fst_compat -_scratch_unmount - -mkfs_v2 -echo "Reverting to free space cache" -_scratch_mount -o clear_cache,space_cache=v1 -check_fst_compat -_scratch_unmount - -# success, all done -status=0 -exit diff --git a/tests/btrfs/131.out b/tests/btrfs/131.out deleted file mode 100644 index aaa4a70a34c3..000000000000 --- a/tests/btrfs/131.out +++ /dev/null @@ -1,20 +0,0 @@ -QA output created by 131 -Using free space cache -free space tree is disabled -Enabling free space tree -free space tree is enabled -Disabling free space cache and enabling free space tree -free space tree is enabled -Trying to mount without free space tree -mount failed -mount failed -Mounting existing free space tree -free space tree is enabled -free space tree is enabled -Recreating free space tree -free space tree is enabled -free space tree is enabled -Disabling free space tree -free space tree is disabled -Reverting to free space cache -free space tree is disabled
Test case btrfs/131 is a quick tests for v1/v2 free space related behavior, including the mount time conversion and disabling of v2 space cache. However there are two problems, mostly related to the v2 cache clearing. - There are some features with hard dependency on v2 free space cache Including: * block-group-tree * extent-tree-v2 * subpage support Note those features may even not support clearing v2 cache. - The v1 free space cache is going to be deprecated Since v5.15 the default mkfs is already going v2 cache instead. It won't be long before we mark v1 cache deprecated and force to go v2 cache. This makes the test case to fail unnecessarily, the false failure would only grow with new features relying on v2 cache. So here let's removing the test case completely. Signed-off-by: Qu Wenruo <wqu@suse.com> --- tests/btrfs/131 | 124 -------------------------------------------- tests/btrfs/131.out | 20 ------- 2 files changed, 144 deletions(-) delete mode 100755 tests/btrfs/131 delete mode 100644 tests/btrfs/131.out