From: Junho Ryu <jayr@google.com>
To: xfs@oss.sgi.com
Cc: tytso@mit.edu, hughd@google.com, branto@redhat.com,
Junho Ryu <jayr@google.com>
Subject: [PATCH 01/10] xfstests: Add tmpfs support
Date: Tue, 10 Dec 2013 12:11:52 -0800 [thread overview]
Message-ID: <1386706321-15795-2-git-send-email-jayr@google.com> (raw)
In-Reply-To: <1386706321-15795-1-git-send-email-jayr@google.com>
From: Boris Ranto <branto@redhat.com>
This is just a simple patch to get the tmpfs working as a target file
system. The patch copies the way nfs is handled in xfstests.
I didn't change the xfstests logic to recognize a proper SCRATCH_DEV.
Hence, the SCRATCH_DEV for tmpfs should be in nfs form (with ':' sign
in it) in order for this to work properly.
Signed-off-by: Boris Ranto <branto@redhat.com>
Signed-off-by: Junho Ryu <jayr@google.com>
---
check | 2 ++
common/rc | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/check b/check
index c88bcf2..320ad26 100755
--- a/check
+++ b/check
@@ -73,6 +73,7 @@ usage()
check options
-nfs test NFS
+ -tmpfs test TMPFS
-l line mode diff
-udiff show unified diff (default)
-n show me, do not run tests
@@ -207,6 +208,7 @@ while [ $# -gt 0 ]; do
-\? | -h | --help) usage ;;
-nfs) FSTYP=nfs ;;
+ -tmpfs) FSTYP=tmpfs ;;
-g) group=$2 ; shift ;
GROUP_LIST="$GROUP_LIST $group"
diff --git a/common/rc b/common/rc
index 5f61d57..a2005c9 100644
--- a/common/rc
+++ b/common/rc
@@ -112,6 +112,10 @@ _mount_opts()
# acls aren't turned on by default on gfs2
export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
;;
+ tmpfs)
+ # We need to specify the size at mount, use 512 MB by default
+ export MOUNT_OPTIONS="-o size=512M $TMPFS_MOUNT_OPTIONS"
+ ;;
*)
;;
esac
@@ -140,6 +144,9 @@ _mkfs_opts()
jfs)
export MKFS_OPTIONS="$JFS_MKFS_OPTIONS -q"
;;
+ tmpfs)
+ export MKFS_OPTIONS="$TMPFS_MKFS_OPTIONS"
+ ;;
*)
;;
esac
@@ -544,6 +551,9 @@ _scratch_mkfs()
ext4)
_scratch_mkfs_ext4 $*
;;
+ tmpfs)
+ # do nothing for tmpfs
+ ;;
*)
yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
;;
@@ -977,6 +987,12 @@ _require_scratch()
nfs*)
_notrun "requires a scratch device"
;;
+ tmpfs)
+ if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ];
+ then
+ _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV"
+ fi
+ ;;
*)
if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
then
@@ -1701,6 +1717,9 @@ _check_test_fs()
btrfs)
_check_btrfs_filesystem $TEST_DEV
;;
+ tmpfs)
+ # no way to check consistency for tmpfs
+ ;;
*)
_check_generic_filesystem $TEST_DEV
;;
@@ -1733,6 +1752,9 @@ _check_scratch_fs()
btrfs)
_check_btrfs_filesystem $device
;;
+ tmpfs)
+ # no way to check consistency for tmpfs
+ ;;
*)
_check_generic_filesystem $device
;;
--
1.8.5.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-12-10 20:12 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 20:11 [PATCH 00/10] Add tmpfs filesystem support Junho Ryu
2013-12-10 20:11 ` Junho Ryu [this message]
2013-12-11 7:40 ` [PATCH 01/10] xfstests: Add tmpfs support Christoph Hellwig
2013-12-17 16:40 ` Rich Johnston
2013-12-10 20:11 ` [PATCH 02/10] xfstests: use mount point instead of device name Junho Ryu
2013-12-11 7:42 ` Christoph Hellwig
2013-12-10 20:11 ` [PATCH 03/10] xfstests: _scratch_mkfs_sized() for tmpfs Junho Ryu
2013-12-11 7:44 ` Christoph Hellwig
2013-12-10 20:11 ` [PATCH 04/10] xfstests: increase tmpfs memory size Junho Ryu
2013-12-11 7:44 ` Christoph Hellwig
2013-12-10 20:11 ` [PATCH 05/10] xfstests: do not unmount tmpfs during remount Junho Ryu
2013-12-11 7:46 ` Christoph Hellwig
2013-12-11 22:40 ` Dave Chinner
2013-12-12 0:16 ` Theodore Ts'o
2013-12-12 0:53 ` Dave Chinner
2013-12-12 18:01 ` Christoph Hellwig
2013-12-12 22:56 ` Dave Chinner
2013-12-13 0:00 ` Junho Ryu
2013-12-13 1:41 ` Dave Chinner
2013-12-13 11:12 ` Christoph Hellwig
2013-12-13 4:56 ` Theodore Ts'o
2013-12-13 11:04 ` Christoph Hellwig
2013-12-10 20:11 ` [PATCH 06/10] xfstests: fix generic/225 to check fiemap support Junho Ryu
2013-12-11 7:46 ` Christoph Hellwig
2013-12-11 22:42 ` Dave Chinner
2013-12-12 18:01 ` Christoph Hellwig
2013-12-12 22:44 ` Junho Ryu
2013-12-12 23:00 ` Dave Chinner
2013-12-10 20:11 ` [PATCH 07/10] xfstests: fix generic/127 to call _cleanup() only once Junho Ryu
2013-12-11 7:47 ` Christoph Hellwig
2013-12-10 20:11 ` [PATCH 08/10] xfstests: check O_DIRECT support before testing direct I/O Junho Ryu
2013-12-11 7:47 ` Christoph Hellwig
2013-12-10 20:12 ` [PATCH 09/10] xfstests: add executable permission to tests Junho Ryu
2013-12-11 7:48 ` Christoph Hellwig
2013-12-10 20:12 ` [PATCH 10/10] xfstests: skip parts of tests which cannot work on tmpfs Junho Ryu
2013-12-11 7:51 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386706321-15795-2-git-send-email-jayr@google.com \
--to=jayr@google.com \
--cc=branto@redhat.com \
--cc=hughd@google.com \
--cc=tytso@mit.edu \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox