From 3ef27d6443012234705851781e258b47d9a2e4e7 Mon Sep 17 00:00:00 2001 From: Tim Shimmin Date: Thu, 2 Jun 2005 15:09:19 +0000 Subject: [PATCH] xfs_io -> XFS_IO_PROG as used by dgc Merge of master-melb:xfs-cmds:22779a by kenmcd. --- 071 | 14 +++++++------- 072 | 10 +++++----- 078 | 2 +- 090 | 8 ++++---- 094 | 12 ++++++------ 103 | 10 +++++----- 104 | 2 +- 106 | 2 +- 107 | 4 ++-- 108 | 10 +++++----- common.config | 2 ++ 11 files changed, 39 insertions(+), 37 deletions(-) diff --git a/071 b/071 index 7beab8dc..da77c609 100755 --- a/071 +++ b/071 @@ -85,16 +85,16 @@ write_block() echo "Writing $bytes bytes, offset is $words (direct=$direct)" | _filter_io echo "Writing $bytes bytes at $location $words (direct=$direct)" >>$seq.full - xfs_io -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq \ - 2>&1 | _filter_off $offset | _filter_xfs_io | tee -a $seq.full + $XFS_IO_PROG -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq \ + 2>&1 | _filter_off $offset | _filter_$XFS_IO_PROG | tee -a $seq.full xfs_bmap -v $SCRATCH_MNT/$seq >>$seq.full echo "Reading $bytes bytes (direct=$direct)" | _filter_io echo "Reading $bytes bytes at $location (direct=$direct)" >>$seq.full - xfs_io -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq \ - 2>&1 | _filter_off $offset | _filter_xfs_io | tee -a $seq.full + $XFS_IO_PROG -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq \ + 2>&1 | _filter_off $offset | _filter_$XFS_IO_PROG | tee -a $seq.full - xfs_io -c "pread -v $offset $bytes" $flags $SCRATCH_MNT/$seq >>$seq.full + $XFS_IO_PROG -c "pread -v $offset $bytes" $flags $SCRATCH_MNT/$seq >>$seq.full echo | tee -a $seq.full } @@ -103,7 +103,7 @@ write_block() _supported_fs xfs _supported_os IRIX Linux -[ -x /usr/sbin/xfs_io ] || _notrun "xfs_io executable not found" +[ -x $XFS_IO_PROG ] || _notrun "$XFS_IO_PROG executable not found" _require_scratch _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs @@ -139,7 +139,7 @@ fi # boundary (and stash xfs_bmap output), before moving onto # each new test point. -xfs_io -c "truncate 0" -f $SCRATCH_MNT/$seq +$XFS_IO_PROG -c "truncate 0" -f $SCRATCH_MNT/$seq oneTB=`echo 1024 \* 1024 \* 1024 \* 1024 | bc` count=`expr $upperbound - 1` diff --git a/072 b/072 index af150bc7..466a8f7f 100755 --- a/072 +++ b/072 @@ -61,7 +61,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fs xfs _supported_os IRIX Linux -[ -x /usr/sbin/xfs_io ] || _notrun "xfs_io executable not found" +[ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found" _require_scratch @@ -78,19 +78,19 @@ avail=`df -P $SCRATCH_MNT | awk 'END {print $4}'` echo Silence is golden # reserve 1GiB, truncate at 100bytes -xfs_io -f -c 'resvsp 0 1g' -c 'truncate 100' $SCRATCH_MNT/ouch +$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'truncate 100' $SCRATCH_MNT/ouch rm -f $SCRATCH_MNT/ouch # reserve 1GiB, truncate at 1GiB -xfs_io -f -c 'resvsp 0 1g' -c 'truncate 1g' $SCRATCH_MNT/ouch +$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'truncate 1g' $SCRATCH_MNT/ouch rm -f $SCRATCH_MNT/ouch # reserve 1GiB, truncate at 2GiB -xfs_io -f -c 'resvsp 0 1g' -c 'truncate 2g' $SCRATCH_MNT/ouch +$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'truncate 2g' $SCRATCH_MNT/ouch rm -f $SCRATCH_MNT/ouch # reserve 1GiB, 1GiB hole, reserve 1MiB, truncate at 3GiB -xfs_io -f -c 'resvsp 0 1g' -c 'resvsp 2g 1m' -c 'truncate 3g' $SCRATCH_MNT/ouch +$XFS_IO_PROG -f -c 'resvsp 0 1g' -c 'resvsp 2g 1m' -c 'truncate 3g' $SCRATCH_MNT/ouch rm -f $SCRATCH_MNT/ouch # success, all done diff --git a/078 b/078 index 106e1342..93e3827b 100755 --- a/078 +++ b/078 @@ -95,7 +95,7 @@ _grow_loop() | _filter_mkfs 2>/dev/null echo "*** extend loop file" - xfs_io -c "pwrite $new_size $bsize" $LOOP_DEV | _filter_io + $XFS_IO_PROG -c "pwrite $new_size $bsize" $LOOP_DEV | _filter_io echo "*** mount loop filesystem" mount -t xfs -o loop $LOOP_DEV $LOOP_MNT diff --git a/090 b/090 index 2b64d8d7..4fa9d8f7 100755 --- a/090 +++ b/090 @@ -84,7 +84,7 @@ realtime_direct_aligned() echo direct realtime writes, 4 files, 2m each, increasing offsets. for i in 0 1 2 3 do - xfs_io -fdxR $SCRATCH_MNT/rt-direct-$1-$i \ + $XFS_IO_PROG -fdxR $SCRATCH_MNT/rt-direct-$1-$i \ -c "extsize $1" -c "pwrite ${i}m 1m" \ | _filter_io done @@ -96,7 +96,7 @@ realtime_buffer_aligned() echo buffered realtime writes, 4 files, 2m each, increasing offsets. for i in 0 1 2 3 do - xfs_io -fxR $SCRATCH_MNT/rt-buffera-$1-$i \ + $XFS_IO_PROG -fxR $SCRATCH_MNT/rt-buffera-$1-$i \ -c "extsize $1" -c "pwrite ${i}m 1m" \ | _filter_io done @@ -108,7 +108,7 @@ realtime_buffer_unaligned() echo buffered realtime writes, 4 files, unaligned byte offsets/sizes. for i in 0 1 2 3 do - xfs_io -fxR $SCRATCH_MNT/rt-bufferu-$1-$i \ + $XFS_IO_PROG -fxR $SCRATCH_MNT/rt-bufferu-$1-$i \ -c "extsize $1" -c "pwrite $i 1" \ | _filter_io done @@ -120,7 +120,7 @@ realtime_mmap_unaligned() # mmap realtime writes, 4 files, unaligned byte offsets/sizes. for i in 0 1 2 3 do - xfs_io -fxR $SCRATCH_MNT/rt-mmap-$1-$i \ + $XFS_IO_PROG -fxR $SCRATCH_MNT/rt-mmap-$1-$i \ -c "extsize $1" -c "pwrite $i 1" \ | _filter_io done diff --git a/094 b/094 index fcabd2dd..8fadd0de 100755 --- a/094 +++ b/094 @@ -93,20 +93,20 @@ mkdir $SCRATCH_MNT/testdir # unset inode attribute, create files below and check they're not realtime echo "*** create directory with rtinherit" -xfs_io -r -c 'chattr +R' $SCRATCH_MNT/testdir -xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch +$XFS_IO_PROG -r -c 'chattr +R' $SCRATCH_MNT/testdir +$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch echo "*** create child with inherited realtime" touch $SCRATCH_MNT/testdir/realtime -xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir/realtime | _filter_scratch +$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir/realtime | _filter_scratch echo "*** remove rtinherit from directory" -xfs_io -r -c 'chattr -R' $SCRATCH_MNT/testdir -xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch +$XFS_IO_PROG -r -c 'chattr -R' $SCRATCH_MNT/testdir +$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir | _filter_scratch echo "*** create child without inherited realtime" touch $SCRATCH_MNT/testdir/non-realtime -xfs_io -r -c 'lsattr' $SCRATCH_MNT/testdir/non-realtime | _filter_scratch +$XFS_IO_PROG -r -c 'lsattr' $SCRATCH_MNT/testdir/non-realtime | _filter_scratch echo "*** done" diff --git a/103 b/103 index 92940923..223244d3 100755 --- a/103 +++ b/103 @@ -85,7 +85,7 @@ _create_scratch echo "*** testing nosymlinks directories" mkdir $SCRATCH_MNT/nosymlinks echo "*** setting nosymlinks bit" -xfs_io -r -c 'chattr +n' -c lsattr $SCRATCH_MNT/nosymlinks \ +$XFS_IO_PROG -r -c 'chattr +n' -c lsattr $SCRATCH_MNT/nosymlinks \ | _filter_scratch touch $SCRATCH_MNT/nosymlinks/source ln -s $SCRATCH_MNT/nosymlinks/source $SCRATCH_MNT/nosymlinks/target 2>&1 \ @@ -96,7 +96,7 @@ echo "*** 1st listing..." find $SCRATCH_MNT | _filter_scratch echo "*** clearing nosymlinks bit" -xfs_io -r -c 'chattr -n' -c lsattr $SCRATCH_MNT/nosymlinks | _filter_scratch +$XFS_IO_PROG -r -c 'chattr -n' -c lsattr $SCRATCH_MNT/nosymlinks | _filter_scratch ln -s $SCRATCH_MNT/nosymlinks/source $SCRATCH_MNT/nosymlinks/target ln $SCRATCH_MNT/nosymlinks/source $SCRATCH_MNT/nosymlinks/hardlinksareok2 @@ -108,12 +108,12 @@ echo "*** finished testing nosymlinks directories" # echo "*** testing inherited project IDs" # mkdir $SCRATCH_MNT/projectids -# xfs_io -r -c 'chattr +P' -c lsattr -c 'chproj 42' $SCRATCH_MNT/projectids\ +# $XFS_IO_PROG -r -c 'chattr +P' -c lsattr -c 'chproj 42' $SCRATCH_MNT/projectids\ # | _filter_scratch # mkdir -p $SCRATCH_MNT/projectids/a/b # touch $SCRATCH_MNT/projectids/a/b/c -# xfs_io -r -c 'lsattr -R' $SCRATCH_MNT/projectids -# xfs_io -r -c 'lsproj' $SCRATCH_MNT/projectids/a $SCRATCH_MNT/projectids/a/b/c\ +# $XFS_IO_PROG -r -c 'lsattr -R' $SCRATCH_MNT/projectids +# $XFS_IO_PROG -r -c 'lsproj' $SCRATCH_MNT/projectids/a $SCRATCH_MNT/projectids/a/b/c\ # | _filter_scratch # echo "*** 3rd listing..." # find $SCRATCH_MNT | _filter_scratch diff --git a/104 b/104 index 54374c32..2e732cdc 100644 --- a/104 +++ b/104 @@ -66,7 +66,7 @@ _create_scratch() _fill_scratch() { - xfs_io -f -c "resvsp 0 ${1}" $SCRATCH_MNT/resvfile + $XFS_IO_PROG -f -c "resvsp 0 ${1}" $SCRATCH_MNT/resvfile } _stress_scratch() diff --git a/106 b/106 index 00451a9c..ecb97592 100755 --- a/106 +++ b/106 @@ -75,7 +75,7 @@ uid=255 gid=254 prid=253 rm -f $SCRATCH_MNT/resv -xfs_io -fc "resvsp 0 200m" -c "chproj $prid" $SCRATCH_MNT/resv +$XFS_IO_PROG -fc "resvsp 0 200m" -c "chproj $prid" $SCRATCH_MNT/resv chown $uid $SCRATCH_MNT/resv chgrp $gid $SCRATCH_MNT/resv diff --git a/107 b/107 index 6030be0e..5584f558 100755 --- a/107 +++ b/107 @@ -107,7 +107,7 @@ xfs_quota -c 'project -c 6' $QARGS | filter_xfs_quota echo "### deny a hard link - wrong project ID" rm -f $SCRATCH_MNT/outer $target/inner -xfs_io -f -c 'chproj 789' $SCRATCH_MNT/outer +$XFS_IO_PROG -f -c 'chproj 789' $SCRATCH_MNT/outer ln $SCRATCH_MNT/outer $target/inner 2>/dev/null if [ $? -eq 0 ]; then echo hard link succeeded @@ -118,7 +118,7 @@ fi xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota echo "### allow a hard link - right project ID" -xfs_io -c 'chproj 6' $SCRATCH_MNT/outer +$XFS_IO_PROG -c 'chproj 6' $SCRATCH_MNT/outer ln $SCRATCH_MNT/outer $target/inner if [ $? -eq 0 ]; then echo hard link succeeded diff --git a/108 b/108 index d7c6667d..93aa55ad 100755 --- a/108 +++ b/108 @@ -69,12 +69,12 @@ test_files() { echo; echo "### create files, setting up ownership (type=$type)" rm -f $SCRATCH_MNT/{buffer,direct,mmap} - xfs_io -fc "chproj $prid" $SCRATCH_MNT/{buffer,direct,mmap} + $XFS_IO_PROG -fc "chproj $prid" $SCRATCH_MNT/{buffer,direct,mmap} chown $uid $SCRATCH_MNT/{buffer,direct,mmap} chgrp $gid $SCRATCH_MNT/{buffer,direct,mmap} for file in $SCRATCH_MNT/{buffer,direct,mmap}; do $here/src/lstat64 $file | head -3 | filter_scratch - xfs_io -c lsproj $file + $XFS_IO_PROG -c lsproj $file done } @@ -82,11 +82,11 @@ test_accounting() { echo "### some controlled buffered, direct and mmapd IO (type=$type)" echo "--- initiating parallel IO..." >>$seq.full - xfs_io -c 'pwrite -b 1m 0 16m' -c 'fsync' \ + $XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -c 'fsync' \ $SCRATCH_MNT/buffer >>$seq.full 2>&1 & - xfs_io -c 'pwrite -b 1m 0 16m' -d \ + $XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -d \ $SCRATCH_MNT/direct >>$seq.full 2>&1 & - xfs_io -c 't 16m' -c 'mm -rw 0 16m' -c 'mw 0 16m' -c 'ms -s' \ + $XFS_IO_PROG -c 't 16m' -c 'mm -rw 0 16m' -c 'mw 0 16m' -c 'ms -s' \ $SCRATCH_MNT/mmap >>$seq.full 2>&1 & wait echo "--- completed parallel IO ($type)" >>$seq.full diff --git a/common.config b/common.config index d36a1ac7..f677219a 100644 --- a/common.config +++ b/common.config @@ -151,6 +151,8 @@ export XFS_LOGPRINT_PROG="`set_prog_path xfs_logprint`" export XFS_REPAIR_PROG="`set_prog_path xfs_repair`" export XFS_CHECK_PROG="`set_prog_path xfs_check`" export XFS_DB_PROG="`set_prog_path xfs_db`" +export XFS_GROWFS_PROG=`set_prog_path xfs_growfs` +export XFS_IO_PROG="`set_prog_path xfs_io`" case "$HOSTOS" in IRIX*) -- 2.39.5