mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs: add test for btrfs cloning with file holes
Regression test for the btrfs ioctl clone operation when the source range
contains hole(s) and the FS has the NO_HOLES feature enabled (file holes
don't need file extent items in the btree to represent them).
This issue is fixed by the following linux kernel btrfs patch:
Btrfs: fix clone to deal with holes when NO_HOLES feature is enabled
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
45d1fac130
commit
36271c9b68
@@ -2177,6 +2177,31 @@ _require_btrfs_send_stream_version()
|
||||
fi
|
||||
}
|
||||
|
||||
_require_btrfs_mkfs_feature()
|
||||
{
|
||||
if [ -z $1 ]; then
|
||||
echo "Missing feature name argument for _require_btrfs_mkfs_feature"
|
||||
exit 1
|
||||
fi
|
||||
feat=$1
|
||||
$MKFS_BTRFS_PROG -O list-all 2>&1 | \
|
||||
grep '^[ \t]*'"$feat"'\b' > /dev/null 2>&1
|
||||
[ $? -eq 0 ] || \
|
||||
_notrun "Feature $feat not supported in the available version of mkfs.btrfs"
|
||||
}
|
||||
|
||||
_require_btrfs_fs_feature()
|
||||
{
|
||||
if [ -z $1 ]; then
|
||||
echo "Missing feature name argument for _require_btrfs_fs_feature"
|
||||
exit 1
|
||||
fi
|
||||
feat=$1
|
||||
modprobe btrfs > /dev/null 2>&1
|
||||
[ -e /sys/fs/btrfs/features/$feat ] || \
|
||||
_notrun "Feature $feat not supported by the available btrfs version"
|
||||
}
|
||||
|
||||
init_rc()
|
||||
{
|
||||
if [ "$iam" == new ]
|
||||
|
||||
Reference in New Issue
Block a user