Abstract out some common quota shell code, add project operation to fsstress.

Merge of master-melb:xfs-cmds:22099a by kenmcd.
This commit is contained in:
Nathan Scott
2005-04-08 03:50:59 +00:00
parent a91bfa6f4c
commit a175e44297
3 changed files with 39 additions and 23 deletions
+2 -22
View File
@@ -74,9 +74,7 @@ _require_scratch
_require_quota
# setup a default run
if [ -z "$MOUNT_OPTIONS" ]; then
export MOUNT_OPTIONS="-o uquota"
fi
[ -z "$MOUNT_OPTIONS" ] && export MOUNT_OPTIONS="-o uquota"
blksoft=100
blkhard=500
@@ -119,25 +117,7 @@ else
QUOTA_FS=$SCRATCH_MNT
fi
# setup exactly what it is we'll be testing
enforce=1
if src/feature -u $SCRATCH_DEV
then
type=u ; eval `_choose_uid`; ln -s $seq.usrquota $seq.out
elif src/feature -g $SCRATCH_DEV
then
type=g ; eval `_choose_gid`; ln -s $seq.grpquota $seq.out
elif src/feature -U $SCRATCH_DEV
then
type=u ; eval `_choose_uid`; ln -s $seq.uqnoenforce $seq.out
enforce=0
elif src/feature -G $SCRATCH_DEV
then
type=g ; eval `_choose_gid`; ln -s $seq.gqnoenforce $seq.out
enforce=0
else
_notrun "No quota support at mount time"
fi
_qsetup
echo "Using output from '" `ls -l $seq.out` "'" >>$seq.full
echo "and using type=$type id=$id" >>$seq.full