* [PATCH 0/4] xfstests: Test pquota and gquota being used together
@ 2012-02-21 16:58 Chandra Seetharaman
2012-02-21 16:58 ` [PATCH 1/4] xfstests: Fix a problem where using bsize was not working as expected Chandra Seetharaman
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Chandra Seetharaman @ 2012-02-21 16:58 UTC (permalink / raw)
To: xfs; +Cc: Chandra Seetharaman
Hello All,
These are the set of xfstests additions to test the pquota/gquota separation.
Regards,
chandra
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/4] xfstests: Fix a problem where using bsize was not working as expected 2012-02-21 16:58 [PATCH 0/4] xfstests: Test pquota and gquota being used together Chandra Seetharaman @ 2012-02-21 16:58 ` Chandra Seetharaman 2012-05-04 21:01 ` Ben Myers 2012-02-21 16:58 ` [PATCH 2/4] xfstests: Add a require_seppquota function Chandra Seetharaman ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: Chandra Seetharaman @ 2012-02-21 16:58 UTC (permalink / raw) To: xfs; +Cc: Chandra Seetharaman >From d60824ddc4a60c7902a53fded6773b3385180cc6 Mon Sep 17 00:00:00 2001 From: Chandra Seetharaman <sekharan@us.ibm.com> Date: Wed, 8 Feb 2012 10:02:37 -0600 Subject: [PATCH 1/3] Fix a problem wherein the bsize argument setting to mkfs fails to be included since MKFS_OPTIONS already has bsize. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> --- common.rc | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/common.rc b/common.rc index cab0b64..61889b0 100644 --- a/common.rc +++ b/common.rc @@ -350,7 +350,10 @@ _scratch_mkfs_sized() case $FSTYP in xfs) - _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize + # replace bsize= in MKFS_OPTIONS if already defined + export MKFS_OPTIONS=$(echo $MKFS_OPTIONS | \ + sed -e "s/-bsize=[0-9]*/-bsize=$blocksize/") + _scratch_mkfs_xfs "-d size=$fssize" ;; ext2|ext3|ext4|ext4dev) /sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks -- 1.7.1 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] xfstests: Fix a problem where using bsize was not working as expected 2012-02-21 16:58 ` [PATCH 1/4] xfstests: Fix a problem where using bsize was not working as expected Chandra Seetharaman @ 2012-05-04 21:01 ` Ben Myers 0 siblings, 0 replies; 8+ messages in thread From: Ben Myers @ 2012-05-04 21:01 UTC (permalink / raw) To: Chandra Seetharaman; +Cc: xfs On Tue, Feb 21, 2012 at 10:58:39AM -0600, Chandra Seetharaman wrote: > >From d60824ddc4a60c7902a53fded6773b3385180cc6 Mon Sep 17 00:00:00 2001 > From: Chandra Seetharaman <sekharan@us.ibm.com> > Date: Wed, 8 Feb 2012 10:02:37 -0600 > Subject: [PATCH 1/3] Fix a problem wherein the bsize argument setting to mkfs fails to be > included since MKFS_OPTIONS already has bsize. > > Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> > --- > common.rc | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/common.rc b/common.rc > index cab0b64..61889b0 100644 > --- a/common.rc > +++ b/common.rc > @@ -350,7 +350,10 @@ _scratch_mkfs_sized() > > case $FSTYP in > xfs) > - _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize > + # replace bsize= in MKFS_OPTIONS if already defined > + export MKFS_OPTIONS=$(echo $MKFS_OPTIONS | \ > + sed -e "s/-bsize=[0-9]*/-bsize=$blocksize/") > + _scratch_mkfs_xfs "-d size=$fssize" What if bsize wasn't specified already in MKFS_OPTIONS? It looks like you wouldn't be passing in a blocksize. -Ben > ;; > ext2|ext3|ext4|ext4dev) > /sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks > -- > 1.7.1 > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/4] xfstests: Add a require_seppquota function 2012-02-21 16:58 [PATCH 0/4] xfstests: Test pquota and gquota being used together Chandra Seetharaman 2012-02-21 16:58 ` [PATCH 1/4] xfstests: Fix a problem where using bsize was not working as expected Chandra Seetharaman @ 2012-02-21 16:58 ` Chandra Seetharaman 2012-05-04 21:26 ` Ben Myers 2012-02-21 16:58 ` [PATCH 3/4] xfstests: Add a simple test to check separate pquota/gquota Chandra Seetharaman 2012-02-21 16:58 ` [PATCH 4/4] xfstests: Add the new test to the group file Chandra Seetharaman 3 siblings, 1 reply; 8+ messages in thread From: Chandra Seetharaman @ 2012-02-21 16:58 UTC (permalink / raw) To: xfs; +Cc: Chandra Seetharaman >From 6076480613e3034eab9758903c093a0b24048658 Mon Sep 17 00:00:00 2001 From: Chandra Seetharaman <sekharan@us.ibm.com> Date: Wed, 8 Feb 2012 10:04:49 -0600 Subject: [PATCH 2/3] Add a require_seppquota function in preparation for testing simultaneous use of pquota and gquota in a filesystem Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> --- common.quota | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/common.quota b/common.quota index 9736306..16344ea 100644 --- a/common.quota +++ b/common.quota @@ -87,6 +87,15 @@ _require_nobody() [ $? -ne 0 ] && _notrun "group file does not contain nobody/nogroup." } +# +# checks to see if mkfs supports separate pquota +# +_require_seppquota() +{ + mkfs.xfs -o test 2>&1 | grep seppquota > /dev/null + [ $? -ne 0 ] && _notrun "mkfs does not support separate pquota." +} + # create a file as a specific user (uid) # takes filename, id, type (u/g/p), blocksize, blockcount # -- 1.7.1 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] xfstests: Add a require_seppquota function 2012-02-21 16:58 ` [PATCH 2/4] xfstests: Add a require_seppquota function Chandra Seetharaman @ 2012-05-04 21:26 ` Ben Myers 0 siblings, 0 replies; 8+ messages in thread From: Ben Myers @ 2012-05-04 21:26 UTC (permalink / raw) To: Chandra Seetharaman; +Cc: xfs On Tue, Feb 21, 2012 at 10:58:45AM -0600, Chandra Seetharaman wrote: > >From 6076480613e3034eab9758903c093a0b24048658 Mon Sep 17 00:00:00 2001 > From: Chandra Seetharaman <sekharan@us.ibm.com> > Date: Wed, 8 Feb 2012 10:04:49 -0600 > Subject: [PATCH 2/3] Add a require_seppquota function in preparation for testing > simultaneous use of pquota and gquota in a filesystem > > Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> > --- > common.quota | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/common.quota b/common.quota > index 9736306..16344ea 100644 > --- a/common.quota > +++ b/common.quota > @@ -87,6 +87,15 @@ _require_nobody() > [ $? -ne 0 ] && _notrun "group file does not contain nobody/nogroup." > } > > +# > +# checks to see if mkfs supports separate pquota > +# > +_require_seppquota() > +{ > + mkfs.xfs -o test 2>&1 | grep seppquota > /dev/null ^^^^^^^ I have a nit to pick about that... FWICS there is no -o option to mkfs.xfs. Here -o works fine to get usage only because we have not yet defined a mkfs option for 'o'. If we were to do that at a later date... who knows? There isn't a -h option to print usage either. It looks like the only way to print usage so you can grep for seppquota is to do something wrong! I suggest that you do this instead: mkfs.xfs 2>&1 | grep seppquota > /dev/null I think we can be fairly certain that mkfs.xfs with zero args will always be a safe way to get usage() to kick off. Other than that silly nit... this looks fine. Reviewed-by: Ben Myers <bpm@sgi.com> -Ben _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] xfstests: Add a simple test to check separate pquota/gquota 2012-02-21 16:58 [PATCH 0/4] xfstests: Test pquota and gquota being used together Chandra Seetharaman 2012-02-21 16:58 ` [PATCH 1/4] xfstests: Fix a problem where using bsize was not working as expected Chandra Seetharaman 2012-02-21 16:58 ` [PATCH 2/4] xfstests: Add a require_seppquota function Chandra Seetharaman @ 2012-02-21 16:58 ` Chandra Seetharaman 2012-02-21 16:58 ` [PATCH 4/4] xfstests: Add the new test to the group file Chandra Seetharaman 3 siblings, 0 replies; 8+ messages in thread From: Chandra Seetharaman @ 2012-02-21 16:58 UTC (permalink / raw) To: xfs; +Cc: Chandra Seetharaman >From d54abe9e75f7b3750982275f04eecd9cc6b86335 Mon Sep 17 00:00:00 2001 From: Chandra Seetharaman <sekharan@us.ibm.com> Date: Wed, 8 Feb 2012 10:06:18 -0600 Subject: [PATCH 3/3] Add a simple test to check simultaneous use of pquota and gquota. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> --- 276 | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 276.out | 69 +++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+), 0 deletions(-) create mode 100755 276 create mode 100644 276.out diff --git a/276 b/276 new file mode 100755 index 0000000..3ce95ab --- /dev/null +++ b/276 @@ -0,0 +1,117 @@ +#! /bin/bash +# FS QA Test No. 276 +# +# Simple quota accounting test for simulaneously using pquota and gquota +# A cut-down version of test # 180. +# +#----------------------------------------------------------------------- +# Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +#----------------------------------------------------------------------- +# +# creator +owner=sekharan@us.ibm.com + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter +. ./common.quota + +# real QA test starts here +_supported_fs xfs +_supported_os Linux +_require_scratch +_require_xfs_quota +_require_seppquota + +test_files() +{ + echo; echo "### create files, setting up ownership (type=$type)" + rm -f $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_PROG -c lsproj $file + done +} + +test_accounting() +{ + echo "### some controlled buffered, direct and mmapd IO (type=$type)" + echo "--- initiating parallel IO..." >>$seq.full + $XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -c 'fsync' \ + $SCRATCH_MNT/buffer >>$seq.full 2>&1 & + $XFS_IO_PROG -c 'pwrite -b 1m 0 16m' -d \ + $SCRATCH_MNT/direct >>$seq.full 2>&1 & + $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 + + for file in $SCRATCH_MNT/{buffer,direct,mmap}; do + $here/src/lstat64 $file | head -3 | _filter_scratch + done + xfs_quota -c "quota -hnb -$type $id" $QARGS | _filter_scratch | _filter_spaces + xfs_quota -c "quota -hni -$type $id" $QARGS | _filter_scratch | _filter_spaces + xfs_quota -c "quota -hnr -$type $id" $QARGS | _filter_scratch | _filter_spaces +} + +export MOUNT_OPTIONS="-opquota" +_qmount +_require_prjquota $SCRATCH_DEV +_require_prjquota $SCRATCH_DEV + +# real QA test starts here +rm -f $tmp.projects $seq.full +umount $SCRATCH_DEV 2>/dev/null +export MKFS_OPTIONS="$MKFS_OPTIONS -d seppquota=1" +_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs +cat $tmp.mkfs >>$seq.full +_scratch_mount + +uid=1 +gid=2 +prid=3 +export QARGS="-x -D /dev/null -P /dev/null $SCRATCH_MNT" +umount $SCRATCH_DEV +export MOUNT_OPTIONS="-ogquota,pquota" +_qmount + +echo; echo "### test group accounting" +type=g +id=$gid +test_files +test_accounting + +#echo; echo "### test project accounting" +type=p +id=$prid +test_files +test_accounting +umount $SCRATCH_DEV 2>/dev/null + +status=0 +exit diff --git a/276.out b/276.out new file mode 100644 index 0000000..4d2390b --- /dev/null +++ b/276.out @@ -0,0 +1,69 @@ +QA output created by 276 +meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks +data = bsize=XXX blocks=XXX, imaxpct=PCT + = sunit=XXX swidth=XXX, unwritten=X +naming =VERN bsize=XXX +log =LDEV bsize=XXX blocks=XXX +realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX + +### test group accounting + +### create files, setting up ownership (type=g) + File: "SCRATCH_MNT/buffer" + Size: 0 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +projid = 3 + File: "SCRATCH_MNT/direct" + Size: 0 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +projid = 3 + File: "SCRATCH_MNT/mmap" + Size: 0 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +projid = 3 +### some controlled buffered, direct and mmapd IO (type=g) + File: "SCRATCH_MNT/buffer" + Size: 16777216 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) + File: "SCRATCH_MNT/direct" + Size: 16777216 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) + File: "SCRATCH_MNT/mmap" + Size: 16777216 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +Disk quotas for Group #2 (2) +Filesystem Blocks Quota Limit Warn/Time Mounted on +SCRATCH_DEV 48M 0 0 00 [------] SCRATCH_MNT +Disk quotas for Group #2 (2) +Filesystem Files Quota Limit Warn/Time Mounted on +SCRATCH_DEV 3 0 0 00 [------] SCRATCH_MNT + +### create files, setting up ownership (type=p) + File: "SCRATCH_MNT/buffer" + Size: 0 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +projid = 3 + File: "SCRATCH_MNT/direct" + Size: 0 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +projid = 3 + File: "SCRATCH_MNT/mmap" + Size: 0 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +projid = 3 +### some controlled buffered, direct and mmapd IO (type=p) + File: "SCRATCH_MNT/buffer" + Size: 16777216 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) + File: "SCRATCH_MNT/direct" + Size: 16777216 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) + File: "SCRATCH_MNT/mmap" + Size: 16777216 Filetype: Regular File + Mode: (0600/-rw-------) Uid: (1) Gid: (2) +Disk quotas for Project #3 (3) +Filesystem Blocks Quota Limit Warn/Time Mounted on +SCRATCH_DEV 48M 0 0 00 [------] SCRATCH_MNT +Disk quotas for Project #3 (3) +Filesystem Files Quota Limit Warn/Time Mounted on +SCRATCH_DEV 3 0 0 00 [------] SCRATCH_MNT -- 1.7.1 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] xfstests: Add the new test to the group file 2012-02-21 16:58 [PATCH 0/4] xfstests: Test pquota and gquota being used together Chandra Seetharaman ` (2 preceding siblings ...) 2012-02-21 16:58 ` [PATCH 3/4] xfstests: Add a simple test to check separate pquota/gquota Chandra Seetharaman @ 2012-02-21 16:58 ` Chandra Seetharaman 2012-05-04 21:07 ` Ben Myers 3 siblings, 1 reply; 8+ messages in thread From: Chandra Seetharaman @ 2012-02-21 16:58 UTC (permalink / raw) To: xfs; +Cc: Chandra Seetharaman >From 16e62fe191e58cd45130376866b779cad2e56683 Mon Sep 17 00:00:00 2001 From: Chandra Seetharaman <sekharan@us.ibm.com> Date: Tue, 21 Feb 2012 09:33:39 -0600 Subject: [PATCH 4/4] Add the new test 276 to the group file. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> --- group | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/group b/group index 08d999a..f39c303 100644 --- a/group +++ b/group @@ -389,3 +389,4 @@ deprecated 273 auto rw 274 auto rw 275 auto rw +276 quota auto quick -- 1.7.1 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] xfstests: Add the new test to the group file 2012-02-21 16:58 ` [PATCH 4/4] xfstests: Add the new test to the group file Chandra Seetharaman @ 2012-05-04 21:07 ` Ben Myers 0 siblings, 0 replies; 8+ messages in thread From: Ben Myers @ 2012-05-04 21:07 UTC (permalink / raw) To: Chandra Seetharaman; +Cc: xfs On Tue, Feb 21, 2012 at 10:58:57AM -0600, Chandra Seetharaman wrote: > >From 16e62fe191e58cd45130376866b779cad2e56683 Mon Sep 17 00:00:00 2001 > From: Chandra Seetharaman <sekharan@us.ibm.com> > Date: Tue, 21 Feb 2012 09:33:39 -0600 > Subject: [PATCH 4/4] Add the new test 276 to the group file. > > Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> > --- > group | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/group b/group > index 08d999a..f39c303 100644 > --- a/group > +++ b/group > @@ -389,3 +389,4 @@ deprecated > 273 auto rw > 274 auto rw > 275 auto rw > +276 quota auto quick I suggest you just roll this into patch 3. -Ben _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-05-04 21:23 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-21 16:58 [PATCH 0/4] xfstests: Test pquota and gquota being used together Chandra Seetharaman 2012-02-21 16:58 ` [PATCH 1/4] xfstests: Fix a problem where using bsize was not working as expected Chandra Seetharaman 2012-05-04 21:01 ` Ben Myers 2012-02-21 16:58 ` [PATCH 2/4] xfstests: Add a require_seppquota function Chandra Seetharaman 2012-05-04 21:26 ` Ben Myers 2012-02-21 16:58 ` [PATCH 3/4] xfstests: Add a simple test to check separate pquota/gquota Chandra Seetharaman 2012-02-21 16:58 ` [PATCH 4/4] xfstests: Add the new test to the group file Chandra Seetharaman 2012-05-04 21:07 ` Ben Myers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox