Josef Bacik [Mon, 22 Nov 2021 14:53:41 +0000 (09:53 -0500)]
btrfs: redirect device replace output to $seqres.full
The btrfs utils are printing a status message about TRIM'ing device on
replace and this is throwing off the golden output, redirect stdout from
'device replace start' to $seqres.full so we don't get false negatives.
Josef Bacik [Wed, 24 Nov 2021 15:17:40 +0000 (10:17 -0500)]
btrfs/176: redirect _format_swapfile to null
Since bb0ab7b2 ("common/rc: Enable _format_swapfile to return the swap
size") we started echo'ing out the swap file size, which is polluting
the golden output for btrfs/176 causing it to fail. Fix this by
redirecting the output to /dev/null.
Darrick J. Wong [Tue, 23 Nov 2021 19:58:06 +0000 (11:58 -0800)]
xfs/122: update for 5.16 typedef removal
In 5.16 we removed the xfs_dsb, xfs_dqblk, and xfs_dinode typedefs,
which means that we need to list the non-typedef struct definitions
explictly in the golden output for this test.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Josef Bacik [Mon, 22 Nov 2021 20:50:29 +0000 (15:50 -0500)]
btrfs/099: use the qgroupid for qgroup limit
A change to btrfs-progs uncovered a problem with btrfs/099, we weren't
specifying the qgroupid with the subvol id. This technically worked
before but only by accident, and all other tests properly specify the
qgroupid for qgroup limit commands. Fix this test to specify the
qgroupid, which will work with older versions of btrfs-progs and newer
ones as well.
Christian Brauner [Fri, 19 Nov 2021 19:42:09 +0000 (20:42 +0100)]
generic: test idmapped mount circular mappings
This is a regression test for the fix in [1]. The test makes sure that
setattr behaves correctly on idmapped mounts that make use of circular
mappings. Such mappings may e.g. be used to allow two users to share
home directories through the same idmapped mount. The tests are
explained in detail in code comments.
Josef Bacik [Mon, 15 Nov 2021 16:29:29 +0000 (11:29 -0500)]
fstests: detect btrfs compression and disable certain tests
Our nightly xfstests runs exposed a set of tests that always fail if we
have compression enabled. This is because compression obviously messes
with the amount of data space allocated on disk, and these tests are
testing either that quota is doing the correct thing, or that we're able
to completely fill the file system.
Add a helper to check to see if we have any of our compression related
mount options set and simply _not_run for these specific tests.
Josef Bacik [Thu, 18 Nov 2021 14:53:20 +0000 (09:53 -0500)]
btrfs: redirect 'btrfs device add' output to seqres.full
I updated btrfs-progs on all my test runners and started failing tests
because I was getting the TRIM messages in the golden output. There
were fixes that went in recently to properly detect TRIM support which
resulted in extra messages being printed. Fix this by redirecting
stdout to $seqres.full for all 'btrfs device add' calls. If anything
fails we'll still pollute the output, but normal status messages will
get properly eaten.
Kent Overstreet [Sat, 13 Nov 2021 21:00:03 +0000 (16:00 -0500)]
generic/544: fix inode number ordering code
The code that creates files and moves them to low/high inode number
files writes different file contents before doing the move - leading to
non-reproducible results.
Fix this by writing the file contents after moving them to high/low
inode number files.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Shiyang Ruan [Tue, 9 Nov 2021 03:21:10 +0000 (11:21 +0800)]
generic: add mmap CoW test for 'mixed' case
Check what happens if we MMAP CoW blocks 2-4 of a page's worth of blocks when
the surrounding blocks vary between unwritten/regular/delalloc/hole.
(MMAP version of generic/229,238)
Qu Wenruo [Sun, 14 Nov 2021 12:51:01 +0000 (20:51 +0800)]
btrfs: make nospace_cache related test cases to work with latest v2 cache
In the coming btrfs-progs v5.15 release, mkfs.btrfs will change to
use v2 cache by default.
However nospace_cache mount option will not work with v2 cache, as
it would make v2 cache out of sync with on-disk used space.
So mounting a btrfs with v2 cache using "nospace_cache" will make
btrfs to reject the mount.
There are quite some test cases relying on nospace_cache to prevent
v1 cache to take up data space.
For those test cases, we no longer need the "nospace_cache" mount
option if the filesystem is already using v2 cache. Since v2 cache
is using metadata space, it will no longer take up data space, thus
no extra mount options for those test cases.
By this, we can keep those existing tests to run without problem for
both v1 and v2 cache.
Josef Bacik [Fri, 12 Nov 2021 21:10:27 +0000 (16:10 -0500)]
fstests: check if the scratch device is an lv device for certain tests
I use lvm to carve up a large disk so I can run the btrfs raid related xfstests.
However this messes with tests that try to greate lvm devices ontop of
SCRATCH_DEV. Handle this by adding a _require_scratch_nolvm helper to skip
tests that are going to try and create lvm devices.
Josef Bacik [Fri, 12 Nov 2021 20:37:48 +0000 (15:37 -0500)]
fstests: print symbolic names for fiemap flags
My nightly btrfs tests are failing on my configs with -o compress because the
extents have FIEMAP_EXTENT_ENCODED set, which throws the golden output off.
Fix this by changing the filter helper to spit out symbolic names for SHARED and
LAST (these tests only care about SHARED). Then change the golden output to
match the new output of the filter. With this patch my -o compress configs now
pass these tests.
Carlos Maiolino [Wed, 10 Nov 2021 12:41:19 +0000 (13:41 +0100)]
generic/643: Fix for 1k block sizes for ext2 and ext3
Currently this test fails on ext2 and ext3 filesystems using 1k block sizes,
because we set the maximum swap size the kernel is allowed to map according to
the mapping kernel created when enabling the original swap file.
But the translation from indirect block mapping to iomap extents associated with
the page alignment requirements imposed by iomap_swapfile_add_extent(), causes
this test to fail. The kernel end up mapping way less pages than the file
actually has.
After the file is extended by the test, the page alignment is not a problem
anymore and the kernel can use the whole space available in the swapfile,
written in its header, and this creates a variance bigger than what the current
test allows, making the tolerance check within the test to fail.
Fix this by using the swap size recorded in the swapfile header (reported by
mkswap), as the maximum swap size the kernel is allowed to map, instead of
reading the swap size mapped by the kernel from /proc. This also makes
the first swap{on/off} cycle unnecessary, so remove it.
Since the size hardcoded in the swapfile header is the limit allowed for the
kernel to map as swap area, this is the real limit the kernel can't map beyond,
and what this test should be checking for.
This patch also slightly changes the way the test check the swap size
'after' the swap file is extended. Instead of retrieving the information
from /proc/swaps directly, the test now relies on 'swapon' tool. This
enables the test to retrieve the swap size in bytes directly, same unit
returned by _format_swapfile. This avoid possible miscalculations caused by
retrieving swap size in different units.
Carlos Maiolino [Wed, 10 Nov 2021 12:41:18 +0000 (13:41 +0100)]
common/rc: Enable _format_swapfile to return the swap size
Once the kernel is free to not map the full swap file during a swapon call,
it can be useful to know the exact size of the swap area created during
_format_swapfile().
To achieve this, it is needed to change other _format_swapfile() callers to drop
the return value if not required, otherwise, it will be printed to stdout making
such tests to fail.
Lukas Czerner [Mon, 8 Nov 2021 15:19:16 +0000 (16:19 +0100)]
ext4: add test for all ext4/ext3/ext2 mount options
Add test to validate that all the ext4, ext3 and ext2 are properly
recognized, validate and applied to avoid regressions as ext4 moves to
the new mount API.
Yang Xu [Wed, 10 Nov 2021 03:21:13 +0000 (11:21 +0800)]
ext4/051: correct kernel commit
ext4/051 fails on my test machine, but I can't find commit in
e2fsprogs according to commit log that said it is a e2fsprog
regression test. Actually, it is a kernel regression test. So
remind user it is a kernel regression test and use correct fix
kernel commit[1].
Eric Biggers [Mon, 8 Nov 2021 04:36:20 +0000 (20:36 -0800)]
generic/574: remove invalid test of read completely past EOF
One of the test cases in generic/574 tests that if a file of length
130999 has fs-verity enabled, and if bytes 131000..131071 (i.e. some
bytes past EOF and in the same block as EOF) are corrupted with nonzero
values, then reads of the corrupted part should fail with EIO.
This isn't a valid test case, because reads that start at or past EOF
are allowed to simply return 0 without doing any I/O.
Therefore, don't run this test case.
This fixes a test failure caused by the kernel commit 8c8387ee3f55
("mm: stop filemap_read() from grabbing a superfluous page").
Note that the other test cases for this same corrupted file remain
valid, including testing that an error is reported during full file
reads and during mmap "reads". This is because the fs-verity Merkle
tree is defined over full blocks, so the file's last block won't be
readable if it contains corrupted (nonzero) bytes past EOF. This may
seem odd, but it's working as intended, especially considering that
bytes past EOF in a file's last block are exposed to userspace in mmaps.
This test output makes it looks like $testfile was created *before* the
'date' command was executed. What really happen was that btime was
truncated according to the granularity defined by filesystem (I've seen
this with both ext4 and xfs, but I guess others are also affected).
Since granularity can't be worse than a second, simply adjust the test
tolerance interval by 1 second.
Signed-off-by: Luís Henriques <lhenriques@suse.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Luis Chamberlain [Fri, 5 Nov 2021 15:59:47 +0000 (08:59 -0700)]
common/btrfs: source module file and remove duplicates
btrfs/249 fails with:
QA output created by 249
./common/btrfs: line 425: _require_loadable_fs_module: command not found
./common/btrfs: line 432: _reload_fs_module: command not found
ERROR: not a btrfs filesystem: /media/scratch
This is because the test is failing to source common/module.
Fix this by sourcing common/module in the btrfs common file.
While it it remove duplication of sourcing this file from other
tests in btrfs so that this is only done once in one place.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Luis Chamberlain [Fri, 5 Nov 2021 16:44:32 +0000 (09:44 -0700)]
fsstress: improve error message on check_cwd() error
I ran into an error with generic/083 with xfs due to check_cwd() but
why it failed is not clear because there are two types of
failures:
o stat64() failed (likely -ENOMEM is my guess)
o the inode actually changed
Throw a bone out to developers so that in case en error does happen
they know which rabbit hole to go into.
Cc: Anthony Iliopoulos <ailiopoulos@suse.de> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Wed, 3 Nov 2021 16:12:06 +0000 (09:12 -0700)]
fsstress: run more than 2^32 operations
Now that storage has gotten really really fast, we have to crank up
TIME_FACTOR to amusingly huge values to do things such as 10-day soak
testing. "Un"fortunately, fsstress uses 'int' to count operations,
which means we get close to maxing out the 2^31 limit on operations in
fsstress. Widen it to a long long value to take us to the heat death of
the universe, like we did for fsx a while back. ;)
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Nikolay Borisov [Mon, 1 Nov 2021 13:56:58 +0000 (15:56 +0200)]
common/rc: Fix check for SCRATCH_DEV_POOL presence in _scratch_dev_pool_get
Current check is buggy because it can never trigger as even if
SCRATCH_DEV_POOL is not defined config_ndevs will get a value of 0
from 'wc -w', this in turn makes 'typeset -p config_ndevs' always
return 0, triggering the existing check a noop.
Fix this by explicitly checking for the presence of SCHRATC_DEV_POOL
Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Shiyang Ruan [Sat, 30 Oct 2021 08:34:31 +0000 (16:34 +0800)]
generic/138,139,140: fix the name for check file
The original 'file3' is used to check if the result after operation on
file2 is correct. So, rename it to be 'file2.chk' to make it easier to
understand.
Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Filipe Manana [Thu, 28 Oct 2021 15:04:33 +0000 (16:04 +0100)]
btrfs: test direct IO write on NOCOW file when low on unallocated space
Test that if we write to a range of a NOCOW file that has allocated
extents and there is not enough available free space for allocating new
data extents, the write succeeds. Test for direct IO and buffered IO
writes.
This currently fails on btrfs for the direct IO write scenario, only, but
while at it also test a buffered IO write, to help prevent regressions in
the future.
The patch that fixes the direct IO case has the following subject:
"btrfs: fix ENOSPC failure when attempting direct IO write into NOCOW range"
Darrick J. Wong [Thu, 28 Oct 2021 20:17:39 +0000 (13:17 -0700)]
dmflakey: fix environment-destroying mistakes in _cleanup_flakey
_cleanup_flakey can be called even when _init_flakey hasn't been called.
For example, _require_flakey_with_error_writes does this.
Unfortunately, the patch to add support for external logs and rt devices
will "reset" the SCRATCH_LOGDEV/SCRATCH_RTDEV variables without noticing
that _init_flakey hasn't been called yet. When this happens, those two
variables will be set to the empty string, with the result that the rest
of the test doesn't use those devices.
To fix this, only reset SCRATCH_LOGDEV/RTDEV to the "NON_FLAKEY" value
if we actually set one.
Fixes: 9c1f3149 ("dmflakey: support external log and realtime devices") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Dave Chinner [Wed, 27 Oct 2021 01:38:42 +0000 (12:38 +1100)]
fstests: _require_dm_target should not always skip DAX capable devices
Recent changes have turned off all dm-error, dm-thin and dm-flakey
tests on pmem devices even when we are not explicitly testing DAX.
This is a regression resulting in a large number of log recovery
tests no longer running on my pmem-based test VMs. I added the "-o
dax=never" mount options to these test configs, only to find it
still would not run the dm tests even though the filesystem will
never use DAX.
Fix this so that the dm target DAX test explicitly ignores the
the block device DAX capability when the filesystem is mounted with
dax=never and hence we can use all the dm targets when the tests are
being run with FSDAX disabled.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Dave Chinner [Sun, 10 Oct 2021 23:06:59 +0000 (10:06 +1100)]
fstests: groupfile generation needs force overwrite
Having built fstests as root as part of a run script, I get failures
then trying to run it as a user because of the group list
generation. The issue occurs because the group list files are owned
by root, and so I get an interactive prompt to overwrite them such
as:
Building btrfs
[GROUP] /home/dave/src/xfstests-dev/tests/btrfs/group.list
mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
Building ceph
[GROUP] /home/dave/src/xfstests-dev/tests/ceph/group.list
mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
Building cifs
[GROUP] /home/dave/src/xfstests-dev/tests/cifs/group.list
mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
Building ext4
[GROUP] /home/dave/src/xfstests-dev/tests/ext4/group.list
...
Use 'mv -f' to ignore such trivial issues so that the new group
lists are written correctly.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Dave Chinner [Sun, 10 Oct 2021 23:06:58 +0000 (10:06 +1100)]
fstests: autoconf has deprecated a bunch of macros
Latest debian unstable environment results in these build warnings:
autoconf
configure.ac:8: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:8: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:8: the top level
configure.ac:50: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:50: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/package_xfslibs.m4:95: AC_PACKAGE_NEED_XFSCTL_MACRO is expanded from...
configure.ac:50: the top level
configure.ac:63: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:63: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
acinclude.m4:19: AC_PACKAGE_WANT_FALLOCATE is expanded from...
configure.ac:63: the top level
configure.ac:64: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:64: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
acinclude.m4:32: AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT is expanded from...
configure.ac:64: the top level
configure.ac:69: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:69: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/package_libcdev.m4:106: AC_HAVE_COPY_FILE_RANGE is expanded from...
configure.ac:69: the top level
configure.ac:107: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:107: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:107: the top level
So, run autoupdate and then fix all the warnings.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Luís Henriques [Mon, 11 Oct 2021 15:11:16 +0000 (16:11 +0100)]
generic/095: align DIO read/writes with the supported sector size for the device
This test creates fio DIO jobs with bs=1k, which will fail when using block
devices that have logical sector size bigger than 1k (such as zram, advanced
format HDD's with 4k sectors, DASD's on mainframes with 2k sectors, etc).
Fix the test by using _min_dio_alignment instead to get the correct size.
Catherine Hoang [Thu, 7 Oct 2021 00:26:40 +0000 (00:26 +0000)]
common/log: move *_dump_log routines to common/log
Move _scratch_remount_dump_log and _test_remount_dump_log from
common/inject to common/log. These routines do not inject errors and
should be placed with other common log functions.
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Catherine Hoang [Thu, 7 Oct 2021 00:26:39 +0000 (00:26 +0000)]
fstests: rename _test_inject_logprint to _test_remount_dump_log
Rename _test_inject_logprint to _test_remount_dump_log to better
describe what this function does. _test_remount_dump_log unmounts
and remounts the test device, dumping the log.
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Catherine Hoang [Thu, 7 Oct 2021 00:26:38 +0000 (00:26 +0000)]
fstests: rename _scratch_inject_logprint to _scratch_remount_dump_log
Rename _scratch_inject_logprint to _scratch_remount_dump_log to
better describe what this function does. _scratch_remount_dump_log
unmounts and remounts the scratch device, dumping the log.
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:40:06 +0000 (17:40 -0700)]
new: don't allow new tests in group 'other'
The 'other' group is vaguely defined at best -- other than what? It's
not clear what tests belong in this group, and it has become a dumping
ground for random stuff that are classified in other groups. Don't let
people create new other group tests.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:40:00 +0000 (17:40 -0700)]
new: standardize group name checking
Use the same group name validation when reading group names from
standard input or from the command line. Now that we require all group
names to be documented, there's no reason to leave these separate
requirements.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:55 +0000 (17:39 -0700)]
new: clean up the group name input code
Clean up the code that reads group names in from the command line to
take advantage of the read command's ability to display a prompt. While
we're at it, we should abort the script if the group list encounters
EOF, and we can tighten up some of the other sh-isms too.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:46 +0000 (17:39 -0700)]
new: only allow documented test group names
Now that we require all group names to be listed in doc/group-names.txt,
we can use that (instead of running mkgroupfile) to check if the group
name(s) supplied by the user actually exist. This has the secondary
effect of being a second nudge towards keeping the description of groups
up to date.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:41 +0000 (17:39 -0700)]
tools: add missing license tags to my scripts
I forgot to add spdx license tags and copyright statements to some of
the tools that I've contributed to fstests. Fix this to be explicit.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:35 +0000 (17:39 -0700)]
tools: make sure that test groups are described in the documentation
Create a file to document the purpose of each test group that is
currently defined in fstests, and change mkgroupfile to check that every
group mentioned in the tests is also mentioned in the documentation.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:30 +0000 (17:39 -0700)]
generic/631: change this test to use the 'whiteout' group
This test isn't really an overlay test; it's a regression test for a bug
that someone found in xfs handling of whiteout files. Since the
'overlay' group has one member, let's move it to 'whiteout'.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:19 +0000 (17:39 -0700)]
xfs: fix incorrect fuzz test group name
The group name for fuzz tests is 'fuzzers'.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:13 +0000 (17:39 -0700)]
xfs: move reflink tests into the clone group
"clone" is the group for tests that exercise FICLONERANGE, so move these
tests.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:39:08 +0000 (17:39 -0700)]
ceph: re-tag copy_file_range as being in the copy_range group
copy_range is the group name for copy_file_range tests, so reclassify
these tests.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Wed, 15 Sep 2021 23:42:20 +0000 (16:42 -0700)]
xfs: test correct propagation of rt extent size hints on rtinherit dirs
This is a regression test for the following fixes:
xfs: standardize extent size hint validation
xfs: validate extsz hints against rt extent size when rtinherit is set
mkfs: validate rt extent size hint when rtinherit is set
These patches fix inadequate rtextsize alignment validation of extent
size hints on directories with the rtinherit and extszinherit flags set.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Fri, 17 Sep 2021 00:48:29 +0000 (17:48 -0700)]
common/rc: use directio mode for the loop device when possible
Recently, I've been observing very high runtimes of tests that
format a filesystem atop a loop device and write enough data to fill
memory, such as generic/590 and generic/361. Logging into the test
VMs, I noticed that the writes to the file on the upper filesystem
started fast, but soon slowed down to about 500KB/s and stayed that
way for nearly 20 minutes. Looking through the D-state processes on
the system revealed:
Here's the xfs_io process performing a buffered write to the file on the
upper filesystem, which at this point has dirtied enough pages to be
ratelimited.
Here's the loop device worker handling the writeback IO submitted by the
flusher thread. Unfortunately, the loop device is using buffered write
mode, which means that /writeback/ is dirtying pages and being throttled
for that. This is stupid.
Fix this by trying to enable "directio" mode on the loop device, which
delivers two performance benefits: setting directio mode also enables
async io mode, which will allow multiple IOs at once; and using directio
nearly eliminates the chance that writeback will get throttled.
On the author's system with fast storage, this reduces the runtime of
g/590 from 20 minutes to 12 seconds, and g/361 from ~30s to ~3s.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Wed, 15 Sep 2021 23:42:06 +0000 (16:42 -0700)]
common/rc: re-fix detection of device-mapper/persistent memory incompatibility
In commit e05491b3, I tried to resolve false test failures that were
a result of device mapper refusing to change access modes on a block
device that supports the FSDAX access mode. Unfortunately, I did
not realize that there are two ways that fsdax support can be
detected via sysfs: /sys/block/XXX/queue/dax and /sys/block/XXX/dax/,
so I only added a test for the latter.
As of 5.15-rc1 this doesn't seem to work anymore for some reason. I
don't know enough about the byzantine world of pmem device driver
initialization, but fsdax mode actually does work even though the
/sys/block/XXX/dax/ path went away. So clearly we have to detect it
via the other sysfs path.
Fixes: e05491b3 ("common/rc: fix detection of device-mapper/persistent memory incompatibility") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Filipe Manana [Fri, 24 Sep 2021 14:06:32 +0000 (15:06 +0100)]
btrfs/179: fix test failure when there are no snapshots to delete
It's very rare, but we can end up in a situation where there are no
snapshots to delete, in which case the $victim variable of the function
delete_workload() ends up being assigned with an empty string. When
that happens we end up running the command:
btrfs subvolume delete "$SCRATCH_MNT/snapshots/"
Which fails since the argument is not a subvolume or a snapshot.
This causes the test to fail due to an unexpected error message from
the subvolume delete command:
btrfs/179 129s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/179.out.bad)
--- tests/btrfs/179.out 2020-10-16 23:13:46.546152332 +0100
+++ /home/fdmanana/git/hub/xfstests/results//btrfs/179.out.bad 2021-09-24 11:15:01.404863801 +0100
@@ -1,2 +1,3 @@
QA output created by 179
+ERROR: Not a Btrfs subvolume: Invalid argument
Silence is golden
...
Fix that by making the delete_workload() loop skip the deletion attempt
when there are no snapshots.
fsstress.c:4629:4: warning: 'oldparid' may be used uninitialized in this function [-Wmaybe-uninitialized]
4629 | printf("%d/%d: rename source entry: id=%d,parent=%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4630 | procid, opno, oldid, oldparid);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fsstress.c:4629:4: warning: 'oldid' may be used uninitialized in this function [-Wmaybe-uninitialized]
But the varaibles are sure to be initialized, it is just that the
heuristics are broken since another check is used later which confuses
gcc. So just initialize the variables, to shup the compile warning.
Cc: kaixuxia <kaixuxia@tencent.com> Cc: Brian Foster <bfoster@redhat.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Luis Chamberlain [Tue, 21 Sep 2021 17:49:52 +0000 (10:49 -0700)]
common/module: use patient module removal
Now that scsi_debug has been using the patient module removal
for a while, let's generalize its use for the other use cases.
This likey will fix some odd false positives due to races.
Darrick J. Wong [Wed, 1 Sep 2021 00:12:26 +0000 (17:12 -0700)]
xfs: regresion test for fsmap problems with realtime
This is a regression test for:
c02f6529864a ("xfs: make xfs_rtalloc_query_range input parameters const") 9ab72f222774 ("xfs: fix off-by-one error when the last rt extent is in use") 7e1826e05ba6 ("xfs: make fsmap backend function key parameters const")
In which we synthesize an XFS with a realtime volume and a special
realtime volume to trip the bugs fixed by all three patches that
resulted in incomplete fsmap output.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Wed, 1 Sep 2021 00:12:20 +0000 (17:12 -0700)]
xfs/108: sync filesystem before querying quota
The new deferred inactivation code is lazy about deallocating
deleted files, which means that we need to be more proactive about
syncing the filesystem after deleting things. When reporting quotas,
XFS only flushes the deferred work if we query quota id 0, so we
need the explicit sync to ensure the quota numbers are not affected
by laziness.
[Eryu: replace the global sync with xfs_io syncfs command]
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Wed, 1 Sep 2021 00:12:15 +0000 (17:12 -0700)]
xfs: test DONTCACHE behavior with the inode cache
Basic testing that DONTCACHE affects the XFS inode cache in the manner
that we expect. The only way we can do that (for XFS, anyway) is to
play around with the BULKSTAT ioctl.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
btrfs/146: require scratch dev and pool before _require_dm_target
The test case btrfs/146 calls _require_dm_target which depends on
SCRATCH_DEV. The test case assumes that valid devices are set in
SCRATCH_DEV_POOL, and one of the devices is propagated to
SCRATCH_DEV. However, when SCRATCH_DEV_POOL is not set, valid value
is not propagated to SCRATCH_DEV and _require_dm_target causes
unexpected test case failure.
To avoid the failure, move _require_scratch and
_require_scratch_dev_pool calls before _require_dm_target call to
detect invalid SCRATCH_DEV_POOL beforehand.
generic/{628,629}: fix order of _require_scratch* and _require_dm_target
Test cases with dm_target shall call _require_scratch* before
_require_dm_target to ensure that valid SCRATCH_DEV is available for
dm_target. However, the test cases generic/628 and generic/629 call
_require_dm_target before _require_scratch*, then unexpected failure
was reported when SCRATCH_DEV is not specified. Fix the order of
function calls.
Ari Sundholm [Fri, 10 Sep 2021 11:53:55 +0000 (14:53 +0300)]
generic/361: require sparse file support and fix mounting the volume.
The test case generic/361 fails on multiple filesystem
implementations due to two issues:
1. A file is created on a 512 MB volume by truncating it to
1 GB. For this to work, the filesystem implementation must
support sparse files. However, the test case does not check
for sparse file support.
2. A loop device, backed by the 1 GB file, is created, mkfs is
run on it and it is mounted. However, the mount command does
not specify the filesystem type. This doesn't always work
properly, as the kernel may pick the wrong driver if there
are multiple implementations for a particular filesystem,
or not find a driver at all in some cases.
To fix the behavior of the test case, this commit adds a requirement
for sparse file support to the test case, and explicitly specifies
the filesystem type as $FSTYP when mounting the loop device.
Darrick J. Wong [Wed, 1 Sep 2021 00:12:01 +0000 (17:12 -0700)]
xfs/449: filter out deprecation warnings from mkfs
To avoid regressing this test when testing XFS v4 when mkfs is new
enough to whine about creating new deprecated filesystems, filter out
the deprecation warning.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Yang Xu [Wed, 1 Sep 2021 12:43:26 +0000 (20:43 +0800)]
idmapped-mounts: Fix build error because of undefined reallocarray
On old glibc, reallocarray was not introduced, so this case compiles
failed. We should use reallocarray if glibc supports and use
realloc if glibcs doesn't support reallocarray.
Yang Xu [Wed, 1 Sep 2021 12:43:24 +0000 (20:43 +0800)]
configure.ac: Fix uncorrect detection because of linux/btrfs.h
On old distros, we can't detect some btrfs structs because of
undeclared 'NULL' in btrfs_err_str function. This function has been
removed after kernel commit 68598d2ea8863 ("btrfs: remove
btrfs_err_str function from uapi/linux/btrfs.h").
Fix this bug in xfstests layer by adding stddef.h because NULL is
defined in stddef.h(it is in /usr/lib/gcc*/ directory).
Nikolay Borisov [Mon, 30 Aug 2021 12:23:05 +0000 (15:23 +0300)]
common/renameat2: Make _rename_tests_source_dest take flags as 4th arguement
Currently this function takes the flags parameter to be passed to the
renameat program by assuming there exists a 'flags' variable. Instead,
make the flags being passed as 4th argument to the function.
After commit 0e4dd8b9 common/rc: fix ignoring of errors on
we are getting this error message when running swapfiles tests:
+./common/rc: line 2553: MKSWAP_PROG: command not found
Rewrite the line.
Signed-off-by: Murphy Zhou <xzhou@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Wed, 1 Sep 2021 00:11:21 +0000 (17:11 -0700)]
generic/643: fix weird problems on 64k-page arm systems
I noticed the following regression on an arm64 system with 64k pages:
--- generic/643.out
+++ generic/643.out.bad
@@ -1,2 +1,3 @@
QA output created by 643
+swapon added 960 pages, expected 896
Silence is golden
Evidently mkswap writes the swapfile header advertising one memory page
less than the size of the file, and on some architectures the kernel
can sometimes grab one page less than what's advertised. This variance
is weird but tolerable; we simply don't want to see the page count
doubling when the file size doubles.
While we're at it, include the commit id of the fix in the commit
message.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Wed, 1 Sep 2021 00:11:16 +0000 (17:11 -0700)]
common/xfs: skip xfs_check unless the test runner forces us to
At long last I've completed my quest to ensure that every corruption
found by xfs_check can also be found by xfs_repair. Since xfs_check
uses more memory than repair and has long been obsolete, let's stop
running it automatically from _check_xfs_filesystem unless the test
runner makes us do it.
Tests that explicitly want xfs_check can call it via _scratch_xfs_check
or _xfs_check; that part doesn't go away.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Dave Chinner [Mon, 30 Aug 2021 01:14:01 +0000 (11:14 +1000)]
fstests: which has been deprecated by Debian
This patch is brought to you by the Department That Hates Users.
The latest debian unstable release is now causing a bunch of new
test failures because they have deprecated the which command.
Rather than make everyone jump through hoops chasing problems with
'which' while debian decides to how to package at least three
variants of 'which' - each which will different semantics, behaviour
and support - as alternatives users then have to opt into, let's
just remove the remaining uses of the shell independent 'which'
command and replace them with bash builtin 'type -P' operations.
Dave Chinner [Mon, 30 Aug 2021 01:13:24 +0000 (11:13 +1000)]
generic/081: clean up snapshot devices correctly
I recently updated the userspace on a DAX-capable test VM, and no
g/081 fails to release the SCRATCH_DEV correctly. g/081 fails on dax
capable devices because DM rejects one of the setup operations:
The 081.full output file shows setup failure and then snapshot
creation failure:
Wiping xfs signature on /dev/pmem1.
Physical volume "/dev/pmem1" successfully created.
Volume group "vg_081" successfully created
Logical volume "base_081" created.
device-mapper: reload ioctl on (251:0) failed: Invalid argument
Failed to suspend logical volume vg_081/base_081.
Device vg_081-base_081-real (251:1) is used by another device.
Failed to revert logical volume vg_081/base_081.
Aborting. Manual intervention required.
Failed to create snapshot
.....
And dmesg tells us the reload ioctl failed because:
[ 2977.522306] device-mapper: ioctl: can't change device type (old=3 vs new=1) after initial table load.
which indicates that the original table is DAX_BIO based (correct,
this is a pmem device) but then one of the setup operations is for
a type that is not DAX capable. Hence it fails and then things go
bad.
But the test has actually created the snapshot device and it's COW
target, so now when the _cleanup() function is called, the vgremove
command fails because the VG is busy (still has snapshot devices
attached to it) and at this point $SCRATCH_DEV is now unusable
without manual cleanup.
Manual cleanup just needs to remove the snapshot and logical base
volumes before trying to remove the vg and pv. With this change, we
now see the teardown do:
....
Failed to create snapshot
umount: /mnt/test/mnt_081: not mounted.
Logical volume "snap_081" successfully removed
Logical volume "base_081" successfully removed
Volume group "vg_081" successfully removed
Labels on physical volume "/dev/pmem1" successfully wiped.
And future tests are able to use the SCRATCH_DEV normally.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Qu Wenruo [Thu, 26 Aug 2021 05:34:32 +0000 (13:34 +0800)]
btrfs: make sure btrfs can create compressed inline extent
Btrfs has the ability to inline small file extents into its metadata,
and such inlined extents can be further compressed if needed.
The new test case is for a regression caused by commit f2165627319f
("btrfs: compression: don't try to compress if we don't have enough
pages").
That commit prevents btrfs from creating compressed inline extents, even
"-o compress,max_inline=2048" is specified, only uncompressed inline
extents can be created.
The test case will make sure that the content of the small file is
consistent between cycle mount, then use "btrfs inspect dump-tree" to
verify the created extent is both inlined and compressed.
The regression is fixed by commit 4e9655763b82 ("Revert "btrfs:
compression: don't try to compress if we don't have enough pages"")
Andreas Gruenbacher [Fri, 27 Aug 2021 21:02:09 +0000 (23:02 +0200)]
generic: Test page faults during read and write
Some filesystems have problems when the buffer passed to read or
write is memory-mapped to the file being read from or written to,
and the buffer needs to be faulted in during the read or write.
That's not common, but filesystems are still required to cope with
it, and if they fail this test, then they will also fail more
complex scenarios that involve multiple files.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Luis Chamberlain [Wed, 25 Aug 2021 21:15:20 +0000 (14:15 -0700)]
common/rc: fix ignoring of errors on
Commit 0c95c8acb ("common: hide permision warning from mkswap for
exfat") and commit 08e93fa7c ("generic/554: hide permision warning on
exfat") removed a warning by grepping an error out. It however broke
use on older versions of bash such as 4.4.23:
./common/rc: line 2554: syntax error near unexpected token `>'
./common/rc: line 2554: ` MKSWAP_PROG "$fname" 2> >(grep -v 'insecure permission' >&2) >> $seqres.full'
Fix both instances by using a $(foo) to run the executable.
Cc: Pavel Reichl <preichl@redhat.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Darrick J. Wong [Mon, 23 Aug 2021 18:21:38 +0000 (11:21 -0700)]
idmap: override btrfs_ioctl_vol_args_v2 if system header doesn't have subvolid
The struct btrfs_ioctl_vol_args_v2 in /usr/include/linux/btrfs.h on
my system predates the inclusion of the "subvolid" field. This
causes the following build failure:
idmapped-mounts.c: In function 'btrfs_delete_subvolume_id':
idmapped-mounts.c:9730:6: error: 'struct btrfs_ioctl_vol_args_v2' has no member named 'subvolid'
9730 | args.subvolid = subvolid;
| ^
Since this source file contains its own more uptodate copy of that
structure, add some more autoconf/cpp magic so that we can override
the struct definition if the system header doesn't have the desired
field.
Signed-off-by: Darrick J. Wong <djwong@kernel.org> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Reviewed-by: Anju T Sudhakar<anju@linux.vnet.ibm.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Theodore Ts'o [Mon, 23 Aug 2021 20:22:31 +0000 (16:22 -0400)]
ext4: add test to validate the large_dir feature
The ext4 large_dir feature supports a directory hash tree with a depth
greater than 2. Reuse the dirstress program to create a sufficiently
large directory in order to exercise the large_dir code paths.
Christian Brauner [Sat, 14 Aug 2021 10:48:05 +0000 (12:48 +0200)]
btrfs: introduce btrfs specific idmapped mounts tests
While core vfs functionality that btrfs implements is completely covered
by the generic test-suite the btrfs specific ioctls are not.
This patch expands the test-suite to cover btrfs specific ioctls that
required changes to work on idmapped mounts. We deliberately don't use
the libbtrfsutil library as we need to know exactly what ioctl's are
issued and we need to be in control of all privileges at all times. This
test-suite currently tests:
- BTRFS_IOC_{SNAP,SUBVOL}_CREATE_V2
- subvolume creation on idmapped mounts where the fsids do have a
mapping in the superblock
- snapshot creation on idmapped mounts where the fsids do have a
mapping in the superblock
- subvolume creation on idmapped mounts where the fsids do not have a
mapping in the superblock
- snapshot creation on idmapped mounts where the fsids do not have
a mapping in the superblock
- subvolume creation on idmapped mounts where the caller is
located in a user namespace and the fsids do have a mapping
in the superblock
- snapshot creation on idmapped mounts where the caller is located
in a user namespace and the fsids do have a mapping in the
superblock
- subvolume creation on idmapped mounts where the caller is
located in a user namespace and the fsids do not have a mapping
in the superblock
- snapshot creation on idmapped mounts where the caller is located
in a user namespace and the fsids do not have a mapping in the
superblock
- BTRFS_IOC_SNAP_DESTROY_V2
- subvolume deletion on idmapped mounts where the fsids do have a
mapping in the superblock
- snapshot deletion on idmapped mounts where the fsids do have a
mapping in the superblock
- subvolume deletion on idmapped mounts where the fsids do not have a
mapping in the superblock
- snapshot deletion on idmapped mounts where the fsids do not have
a mapping in the superblock
- subvolume deletion on idmapped mounts where the caller is
located in a user namespace and the fsids do have a mapping
in the superblock
- snapshot deletion on idmapped mounts where the caller is located
in a user namespace and the fsids do have a mapping in the
superblock
- subvolume deletion on idmapped mounts where the caller is
located in a user namespace and the fsids do not have a mapping
in the superblock
- snapshot deletion on idmapped mounts where the caller is located
in a user namespace and the fsids do not have a mapping in the
superblock
- unprivileged subvolume deletion on idmapped mounts where the fsids
do have a mapping in the superblock and the filesystem is mounted
with "user_subvol_rm_allowed"
- unprivileged snapshot deletion on idmapped mounts where the fsids do
have a mapping in the superblock and the filesystem is mounted with
"user_subvol_rm_allowed"
- subvolume deletion on idmapped mounts where the caller is
located in a user namespace and the fsids do have a mapping
in the superblock and the filesystem is mounted with
"user_subvol_rm_allowed"
- snapshot deletion on idmapped mounts where the caller is located
in a user namespace and the fsids do have a mapping in the
superblock and the filesystem is mounted with
"user_subvol_rm_allowed"
- BTRFS_IOC_SUBVOL_SETFLAGS
- subvolume flags on idmapped mounts where the fsids do have a mapping
in the superblock
- snapshot flags on idmapped mounts where the fsids do have a mapping
in the superblock
- subvolume flags on idmapped mounts where the fsids do not have a
mapping in the superblock
- snapshot flags on idmapped mounts where the fsids do not have a
mapping in the superblock
- subvolume flags on idmapped mounts where the caller is located in a
user namespace and the fsids do have a mapping in the superblock
- snapshot flags on idmapped mounts where the caller is located in a
user namespace and the fsids do have a mapping in the superblock
- subvolume flags on idmapped mounts where the caller is located in a
user namespace and the fsids do not have a mapping in the superblock
- snapshot flags on idmapped mounts where the caller is located in a
user namespace and the fsids do not have a mapping in the superblock
- BTRFS_IOC_INO_LOOKUP_USER
- subvolume lookup on idmapped mounts where the fsids do have a mapping
in the superblock
- subvolume lookup on idmapped mounts where the fsids do not have a
mapping in the superblock
- subvolume lookup on idmapped mounts where the caller is located in a
user namespace and the fsids do have a mapping in the superblock
- subvolume lookup on idmapped mounts where the caller is located in a
user namespace and the fsids do not have a mapping in the superblock
Cc: Christoph Hellwig <hch@infradead.org> Cc: Chris Mason <clm@fb.com> Cc: David Sterba <dsterba@suse.com> Cc: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>