print;"
}
-check_usage()
-{
- quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
- repquota -u -g $SCRATCH_MNT | grep -v "^root" | filter_scratch \
- >$tmp.orig
- quotacheck -u -g $SCRATCH_MNT 2>/dev/null
- repquota -u -g $SCRATCH_MNT | grep -v "^root" | filter_scratch \
- >$tmp.checked
- quotaon -u -g $SCRATCH_MNT 2>/dev/null
- diff $tmp.orig $tmp.checked
-}
-
_fsx()
{
tasks=$1
exit
fi
-if ! check_usage; then
+if ! _check_quota_usage; then
umount $SCRATCH_DEV 2>/dev/null
status=1
exit
exit
fi
-if ! check_usage; then
+if ! _check_quota_usage; then
umount $SCRATCH_DEV 2>/dev/null
status=1
exit
exit
fi
-if ! check_usage; then
+if ! _check_quota_usage; then
umount $SCRATCH_DEV 2>/dev/null
status=1
exit
QA output created by 231
=== FSX Standard Mode, Memory Mapping, 1 Tasks ===
All operations completed A-OK!
+Comparing user usage
+Comparing group usage
=== FSX Standard Mode, Memory Mapping, 4 Tasks ===
All operations completed A-OK!
All operations completed A-OK!
All operations completed A-OK!
All operations completed A-OK!
+Comparing user usage
+Comparing group usage
=== FSX Standard Mode, Memory Mapping, 1 Tasks ===
All operations completed A-OK!
+Comparing user usage
+Comparing group usage
print;"
}
-check_usage()
-{
- quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
- repquota -u -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
- sort >$tmp.orig
- quotacheck -u -g $SCRATCH_MNT 2>/dev/null
- repquota -u -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
- sort >$tmp.checked
- quotaon -u -g $SCRATCH_MNT 2>/dev/null
- diff $tmp.orig $tmp.checked
-}
-
_filter_num()
{
tee -a $here/$seq.full |\
exit
fi
-if ! check_usage; then
+if ! _check_quota_usage; then
umount $SCRATCH_DEV 2>/dev/null
status=1
exit
fsstress -n 2000 -d outdir -p 7
seed = S
+Comparing user usage
+Comparing group usage
print;"
}
-check_usage()
-{
- quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
- repquota -u -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
- sort >$tmp.orig
- quotacheck -u -g $SCRATCH_MNT 2>/dev/null
- repquota -u -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
- sort >$tmp.checked
- quotaon -u -g $SCRATCH_MNT 2>/dev/null
- diff $tmp.orig $tmp.checked
-}
-
_filter_num()
{
tee -a $here/$seq.full |\
exit
fi
-if ! check_usage; then
+if ! _check_quota_usage; then
umount $SCRATCH_DEV 2>/dev/null
status=1
exit
fsstress -z -f rmdir=20 -f link=10 -f creat=10 -f mkdir=10 -f unlink=20 -f symlink=10 -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 -n 5000 -d outdir -p 7
seed = S
+Comparing user usage
+Comparing group usage
echo "MOUNT_OPTIONS = $MOUNT_OPTIONS" >>$seq.full
}
+_check_quota_usage()
+{
+ # Sync to get delalloc to disk
+ sync
+ VFS_QUOTA=0
+ if [ $FSTYP = "ext2" -o $FSTYP = "ext3" -o $FSTYP = "ext4" -o $FSTYP = "reiserfs" ]; then
+ VFS_QUOTA=1
+ quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
+ fi
+ repquota -u -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
+ sort >$tmp.user.orig
+ repquota -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
+ sort >$tmp.group.orig
+ if [ $VFS_QUOTA -eq 1 ]; then
+ quotacheck -u -g $SCRATCH_MNT 2>/dev/null
+ else
+ # use XFS method to force quotacheck
+ mount -o remount,noquota $SCRATCH_DEV
+ mount -o remount,usrquota,grpquota $SCRATCH_DEV
+ fi
+ repquota -u -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
+ sort >$tmp.user.checked
+ repquota -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
+ sort >$tmp.group.checked
+ if [ $VFS_QUOTA -eq 1 ]; then
+ quotaon -u -g $SCRATCH_MNT 2>/dev/null
+ fi
+ {
+ echo "Comparing user usage"
+ diff $tmp.user.orig $tmp.user.checked
+ } && {
+ echo "Comparing group usage"
+ diff $tmp.group.orig $tmp.group.checked
+ }
+}
+
# make sure this script returns success
/bin/true