common: replace chattr with $CHATTR_PROG

We have a wrapper around chattr to make sure people don't do the wrong thing on
their boxes, so we need to be able to specify CHATTR_PROG and have it actually
work, so replace all chattr calls with $CHATTR_PROG.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Josef Bacik
2016-04-05 11:46:12 +10:00
committed by Dave Chinner
parent ddc9483644
commit 102ffa0c96
34 changed files with 41 additions and 41 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ __workout()
work_file="$SCRATCH_MNT/tmpfile"
touch $work_file
chattr =c $work_file
$CHATTR_PROG =c $work_file
$XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io
}
+2 -2
View File
@@ -60,7 +60,7 @@ _scratch_mount
mkdir $SCRATCH_MNT/testdir
echo "Setting compression flag in the directory..."
chattr +c $SCRATCH_MNT/testdir
$CHATTR_PROG +c $SCRATCH_MNT/testdir
echo "Directory compression property value:"
$BTRFS_UTIL_PROG property get $SCRATCH_MNT/testdir compression | \
_filter_btrfs_compress_property
@@ -71,7 +71,7 @@ $BTRFS_UTIL_PROG property get $SCRATCH_MNT/testdir/file1 compression | \
_filter_btrfs_compress_property
echo "Clearing compression flag from directory..."
chattr -c $SCRATCH_MNT/testdir
$CHATTR_PROG -c $SCRATCH_MNT/testdir
echo "Directory compression property value:"
$BTRFS_UTIL_PROG property get $SCRATCH_MNT/testdir compression | \
_filter_btrfs_compress_property
+1 -1
View File
@@ -135,7 +135,7 @@ echo "++ mount image (2)" >> $ROUND2_LOG
_scratch_mount >> $ROUND2_LOG 2>&1
echo "++ chattr -R -i" >> $ROUND2_LOG
chattr -R -f -i "${SCRATCH_MNT}/" > /dev/null 2>> $ROUND2_LOG
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/" > /dev/null 2>> $ROUND2_LOG
echo "++ test scratch" >> $ROUND2_LOG
_scratch_fuzz_test >> $ROUND2_LOG 2>&1
+1 -1
View File
@@ -101,7 +101,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+1 -1
View File
@@ -105,7 +105,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+1 -1
View File
@@ -103,7 +103,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+1 -1
View File
@@ -47,7 +47,7 @@ _scratch_mkfs_sized $((128 * 1024 * 1024)) >> $seqres.full 2>&1
# metadata sync writes inside ext4_handle_dirty_metadata()
_scratch_mount -onoload
touch $SCRATCH_MNT/file
chattr +S $SCRATCH_MNT/file
$CHATTR_PROG +S $SCRATCH_MNT/file
# Create sparse file
for ((i = 0; i < 21; i++))
do
+2 -2
View File
@@ -54,8 +54,8 @@ _scratch_cycle_mount
ctime1=`stat -c %z $SCRATCH_MNT/tmp`
sleep 1
chattr +A $SCRATCH_MNT/tmp
chattr -A $SCRATCH_MNT/tmp
$CHATTR_PROG +A $SCRATCH_MNT/tmp
$CHATTR_PROG -A $SCRATCH_MNT/tmp
ctime2=`stat -c %z $SCRATCH_MNT/tmp`
_scratch_cycle_mount
+2 -2
View File
@@ -56,7 +56,7 @@ chattr_opt: $chattr_opt" >>$seqres.full
dd if=/dev/zero of=$SCRATCH_MNT/file.$idx \
bs=1M count=4 $write_opt \
>> $seqres.full 2>&1 || exit
chattr $chattr_opt $SCRATCH_MNT/file.$idx >> $seqres.full \
$CHATTR_PROG $chattr_opt $SCRATCH_MNT/file.$idx >> $seqres.full \
|| exit
done
done
@@ -73,7 +73,7 @@ chattr_opt: $chattr_opt" >>$seqres.full
chattr_opt: $chattr_opt" >>$seqres.full
dd if=/dev/zero of=$SCRATCH_MNT/file.$idx \
bs=1M $write_opt >> $seqres.full 2>&1
chattr $chattr_opt $SCRATCH_MNT/file.$idx \
$CHATTR_PROG $chattr_opt $SCRATCH_MNT/file.$idx \
>> $seqres.full || exit
done
sync
+1 -1
View File
@@ -148,7 +148,7 @@ echo "++ mount image (2)" >> $ROUND2_LOG
_scratch_mount >> $ROUND2_LOG 2>&1
echo "++ chattr -R -i" >> $ROUND2_LOG
chattr -R -f -i "${SCRATCH_MNT}/" > /dev/null 2>> $ROUND2_LOG
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/" > /dev/null 2>> $ROUND2_LOG
echo "+++ test scratch" >> $ROUND2_LOG
_scratch_fuzz_test >> $ROUND2_LOG 2>&1
+1 -1
View File
@@ -96,7 +96,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+2 -2
View File
@@ -107,7 +107,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files"
broken=0
@@ -130,7 +130,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files (2)"
broken=0
+1 -1
View File
@@ -107,7 +107,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+2 -2
View File
@@ -106,7 +106,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files"
broken=0
@@ -129,7 +129,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files (2)"
broken=0
+2 -2
View File
@@ -106,7 +106,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files"
ls -la "${TESTDIR}" >> $seqres.full
@@ -130,7 +130,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files (2)"
broken=0
+2 -2
View File
@@ -106,7 +106,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files"
ls -la "${TESTDIR}" >> $seqres.full
@@ -130,7 +130,7 @@ echo "+ mount image"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ check files (2)"
broken=0
+1 -1
View File
@@ -107,7 +107,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+1 -1
View File
@@ -110,7 +110,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+1 -1
View File
@@ -99,7 +99,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify files (2)"
broken=0
+1 -1
View File
@@ -96,7 +96,7 @@ echo "+ mount image (2)"
_scratch_mount
echo "+ chattr -R -i"
chattr -R -f -i "${SCRATCH_MNT}/"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"

Some files were not shown because too many files have changed in this diff Show More