* [PATCH 1/3] common/quota: set VFS_QUOTA for gfs2
@ 2015-05-15 13:36 Andrew Price
2015-05-15 13:36 ` [PATCH 2/3] generic/group: add generic/082 to the quota group Andrew Price
2015-05-15 13:36 ` [PATCH 3/3] common/rc: support gfs2 in _scratch_mkfs_sized Andrew Price
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Price @ 2015-05-15 13:36 UTC (permalink / raw)
To: fstests
Use generic quota tools with gfs2.
Fixes "xfs_quota: cannot setup path for mount /mnt/scratch: No such
device or address"
Signed-off-by: Andrew Price <anprice@redhat.com>
---
common/quota | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/quota b/common/quota
index b320cf2..23be4f8 100644
--- a/common/quota
+++ b/common/quota
@@ -213,7 +213,7 @@ _check_quota_usage()
VFS_QUOTA=0
case $FSTYP in
- ext2|ext3|ext4|ext4dev|reiserfs)
+ ext2|ext3|ext4|ext4dev|reiserfs|gfs2)
VFS_QUOTA=1
quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
;;
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] generic/group: add generic/082 to the quota group
2015-05-15 13:36 [PATCH 1/3] common/quota: set VFS_QUOTA for gfs2 Andrew Price
@ 2015-05-15 13:36 ` Andrew Price
2015-05-15 13:36 ` [PATCH 3/3] common/rc: support gfs2 in _scratch_mkfs_sized Andrew Price
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Price @ 2015-05-15 13:36 UTC (permalink / raw)
To: fstests
generic/082 is a quota test so it should be in this group.
Signed-off-by: Andrew Price <anprice@redhat.com>
---
tests/generic/group | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/generic/group b/tests/generic/group
index b6f4b01..e715869 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -84,7 +84,7 @@
079 acl attr ioctl metadata auto quick
080 auto quick
081 auto quick
-082 auto quick
+082 auto quick quota
083 rw auto enospc stress
084 auto metadata quick
085 auto freeze mount
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] common/rc: support gfs2 in _scratch_mkfs_sized
2015-05-15 13:36 [PATCH 1/3] common/quota: set VFS_QUOTA for gfs2 Andrew Price
2015-05-15 13:36 ` [PATCH 2/3] generic/group: add generic/082 to the quota group Andrew Price
@ 2015-05-15 13:36 ` Andrew Price
2015-05-25 22:30 ` Dave Chinner
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Price @ 2015-05-15 13:36 UTC (permalink / raw)
To: fstests
This enables tests which use _scratch_mkfs_sized when $FSTYP == gfs2.
Where tests use a fs size too small to contain a gfs2 fs created with
default options, specify a smaller journal size to make it fit.
Signed-off-by: Andrew Price <anprice@redhat.com>
---
common/config | 1 +
common/rc | 5 ++++-
tests/generic/015 | 3 +++
tests/generic/083 | 3 +++
4 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/common/config b/common/config
index 3732287..2454418 100644
--- a/common/config
+++ b/common/config
@@ -228,6 +228,7 @@ case "$HOSTOS" in
export MKFS_NFS_PROG="false"
export MKFS_CIFS_PROG="false"
export MKFS_REISER4_PROG="`set_prog_path mkfs.reiser4`"
+ export MKFS_GFS2_PROG="`set_prog_path mkfs.gfs2`"
;;
esac
diff --git a/common/rc b/common/rc
index 6ea107e..a269c2b 100644
--- a/common/rc
+++ b/common/rc
@@ -652,7 +652,7 @@ _scratch_mkfs_sized()
xfs)
def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'`
;;
- ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4)
+ ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4|gfs2)
def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
;;
esac
@@ -700,6 +700,9 @@ _scratch_mkfs_sized()
$MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \
`expr $fssize / 1024`
;;
+ gfs2)
+ $MKFS_GFS2_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
+ ;;
*)
_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
;;
diff --git a/tests/generic/015 b/tests/generic/015
index 8d3fd5f..d1805a7 100755
--- a/tests/generic/015
+++ b/tests/generic/015
@@ -53,6 +53,9 @@ _supported_os IRIX Linux
_require_scratch
_require_no_large_scratch_dev
+# GFS2 needs a smaller journal size to fit in 50M
+[ $FSTYP = "gfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J16"
+
_scratch_mkfs_sized `expr 50 \* 1024 \* 1024` >/dev/null 2>&1 \
|| _fail "mkfs failed"
_scratch_mount || _fail "mount failed"
diff --git a/tests/generic/083 b/tests/generic/083
index 61316bf..4e38f81 100755
--- a/tests/generic/083
+++ b/tests/generic/083
@@ -88,6 +88,9 @@ workout()
echo "*** test out-of-space handling for random write operations"
+# GFS2 needs a smaller journal size to fit in 100M
+[ $FSTYP = "gfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J64"
+
filesize=`expr 100 \* 1024 \* 1024`
agcount=6
numprocs=15
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 3/3] common/rc: support gfs2 in _scratch_mkfs_sized
2015-05-15 13:36 ` [PATCH 3/3] common/rc: support gfs2 in _scratch_mkfs_sized Andrew Price
@ 2015-05-25 22:30 ` Dave Chinner
0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2015-05-25 22:30 UTC (permalink / raw)
To: Andrew Price; +Cc: fstests
On Fri, May 15, 2015 at 02:36:44PM +0100, Andrew Price wrote:
> This enables tests which use _scratch_mkfs_sized when $FSTYP == gfs2.
> Where tests use a fs size too small to contain a gfs2 fs created with
> default options, specify a smaller journal size to make it fit.
>
> Signed-off-by: Andrew Price <anprice@redhat.com>
....
> diff --git a/tests/generic/015 b/tests/generic/015
> index 8d3fd5f..d1805a7 100755
> --- a/tests/generic/015
> +++ b/tests/generic/015
> @@ -53,6 +53,9 @@ _supported_os IRIX Linux
> _require_scratch
> _require_no_large_scratch_dev
>
> +# GFS2 needs a smaller journal size to fit in 50M
> +[ $FSTYP = "gfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J16"
This belongs in scratch_mkfs_sized(), as gfs2 specific code. You
have the size of the fs to be made there, so set the limit
appropriately there.
As it is, it's worth considering that this is exposing a mkfs.gfs2
bug in that it doesn't handle small filesystem sizes correctly by
default....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-25 22:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 13:36 [PATCH 1/3] common/quota: set VFS_QUOTA for gfs2 Andrew Price
2015-05-15 13:36 ` [PATCH 2/3] generic/group: add generic/082 to the quota group Andrew Price
2015-05-15 13:36 ` [PATCH 3/3] common/rc: support gfs2 in _scratch_mkfs_sized Andrew Price
2015-05-25 22:30 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox