Message ID | c4991049b54536bb7073f3c2118d12dae604d73d.1736265642.git.fdmanana@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | btrfs: test cycle mounting a filesystem right after enabling simple quotas | expand |
在 2025/1/8 02:32, fdmanana@kernel.org 写道: > From: Filipe Manana <fdmanana@suse.com> > > Test that if we enable simple quotas on a filesystem and unmount it right > after without doing any other changes to the filesystem, we are able to > mount again the filesystem. > > This is a regression test for the following kernel commit: > > f2363e6fcc79 ("btrfs: fix transaction atomicity bug when enabling simple quotas") > > Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > tests/btrfs/328 | 31 +++++++++++++++++++++++++++++++ > tests/btrfs/328.out | 2 ++ > 2 files changed, 33 insertions(+) > create mode 100755 tests/btrfs/328 > create mode 100644 tests/btrfs/328.out > > diff --git a/tests/btrfs/328 b/tests/btrfs/328 > new file mode 100755 > index 00000000..8e56c4d6 > --- /dev/null > +++ b/tests/btrfs/328 > @@ -0,0 +1,31 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (C) 2025 SUSE Linux Products GmbH. All Rights Reserved. > +# > +# FS QA Test 328 > +# > +# Test that if we enable simple quotas on a filesystem and unmount it right > +# after without doing any other changes to the filesystem, we are able to mount > +# again the filesystem. > +# > +. ./common/preamble > +_begin_fstest auto quick qgroup > + > +_fixed_by_kernel_commit f2363e6fcc79 \ > + "btrfs: fix transaction atomicity bug when enabling simple quotas" > + > +_require_scratch_enable_simple_quota > + > +_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed" > +_scratch_mount > + > +$BTRFS_UTIL_PROG quota enable --simple $SCRATCH_MNT > + > +# Without doing any other change to the filesystem, unmount it and mount it > +# again. This should work - we had a bug where it crashed due to an assertion > +# failure (when kernel config has CONFIG_BTRFS_ASSERT=y). > +_scratch_cycle_mount > + > +echo "Silence is golden" > +status=0 > +exit > diff --git a/tests/btrfs/328.out b/tests/btrfs/328.out > new file mode 100644 > index 00000000..67faba8f > --- /dev/null > +++ b/tests/btrfs/328.out > @@ -0,0 +1,2 @@ > +QA output created by 328 > +Silence is golden
looks good.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Thx.
diff --git a/tests/btrfs/328 b/tests/btrfs/328 new file mode 100755 index 00000000..8e56c4d6 --- /dev/null +++ b/tests/btrfs/328 @@ -0,0 +1,31 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2025 SUSE Linux Products GmbH. All Rights Reserved. +# +# FS QA Test 328 +# +# Test that if we enable simple quotas on a filesystem and unmount it right +# after without doing any other changes to the filesystem, we are able to mount +# again the filesystem. +# +. ./common/preamble +_begin_fstest auto quick qgroup + +_fixed_by_kernel_commit f2363e6fcc79 \ + "btrfs: fix transaction atomicity bug when enabling simple quotas" + +_require_scratch_enable_simple_quota + +_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed" +_scratch_mount + +$BTRFS_UTIL_PROG quota enable --simple $SCRATCH_MNT + +# Without doing any other change to the filesystem, unmount it and mount it +# again. This should work - we had a bug where it crashed due to an assertion +# failure (when kernel config has CONFIG_BTRFS_ASSERT=y). +_scratch_cycle_mount + +echo "Silence is golden" +status=0 +exit diff --git a/tests/btrfs/328.out b/tests/btrfs/328.out new file mode 100644 index 00000000..67faba8f --- /dev/null +++ b/tests/btrfs/328.out @@ -0,0 +1,2 @@ +QA output created by 328 +Silence is golden