mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs: use $FILEFRAG_PROG instead of filefrag
$FILEFRAG_PROG has been defined in common/config, so we could apply it. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+2
-2
@@ -53,7 +53,7 @@ _require_scratch
|
|||||||
_require_no_large_scratch_dev
|
_require_no_large_scratch_dev
|
||||||
_require_btrfs_command inspect-internal logical-resolve
|
_require_btrfs_command inspect-internal logical-resolve
|
||||||
_require_btrfs_command inspect-internal inode-resolve
|
_require_btrfs_command inspect-internal inode-resolve
|
||||||
_require_command "/usr/sbin/filefrag" filefrag
|
_require_command "$FILEFRAG_PROG" filefrag
|
||||||
|
|
||||||
rm -f $seqres.full
|
rm -f $seqres.full
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ _filter_extents()
|
|||||||
|
|
||||||
_check_file_extents()
|
_check_file_extents()
|
||||||
{
|
{
|
||||||
cmd="filefrag -v $1"
|
cmd="$FILEFRAG_PROG -v $1"
|
||||||
echo "# $cmd" >> $seqres.full
|
echo "# $cmd" >> $seqres.full
|
||||||
out=`$cmd | _filter_extents`
|
out=`$cmd | _filter_extents`
|
||||||
if [ -z "$out" ]; then
|
if [ -z "$out" ]; then
|
||||||
|
|||||||
+2
-2
@@ -60,7 +60,7 @@ _supported_os Linux
|
|||||||
_require_scratch
|
_require_scratch
|
||||||
# Since xfs_io's fiemap always use SYNC flag and can't be unset,
|
# Since xfs_io's fiemap always use SYNC flag and can't be unset,
|
||||||
# we must use filefrag to call fiemap without SYNC flag.
|
# we must use filefrag to call fiemap without SYNC flag.
|
||||||
_require_command "/usr/sbin/filefrag" filefrag
|
_require_command "$FILEFRAG_PROG" filefrag
|
||||||
_require_xfs_io_command "falloc"
|
_require_xfs_io_command "falloc"
|
||||||
|
|
||||||
filesize=$((10 * 1024 * 1024 * 1024)) #10G size
|
filesize=$((10 * 1024 * 1024 * 1024)) #10G size
|
||||||
@@ -95,7 +95,7 @@ _filter_error() {
|
|||||||
fiemap_work() {
|
fiemap_work() {
|
||||||
filename=$1
|
filename=$1
|
||||||
while true; do
|
while true; do
|
||||||
filefrag $filename 2> $tmp.output 1> /dev/null
|
$FILEFRAG_PROG $filename 2> $tmp.output 1> /dev/null
|
||||||
ret=$?
|
ret=$?
|
||||||
err=`cat $tmp.output | _filter_error`
|
err=`cat $tmp.output | _filter_error`
|
||||||
if [ $ret -ne 0 -o -n "$err" ]; then
|
if [ $ret -ne 0 -o -n "$err" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user