public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Support overlayfs testing.
@ 2014-11-15 20:41 Li Mengyang
  2014-12-01  5:08 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Li Mengyang @ 2014-11-15 20:41 UTC (permalink / raw)
  To: xfs; +Cc: Erez Zadok, miklos


[-- Attachment #1.1: Type: text/plain, Size: 351 bytes --]

Hi,
 Recently people are proposing overlayfs for inclusion into the mainline, I
found it could be helpful if xfstests supports overlayfs testing. Here is
the patch and example configuration file for that. Thank you.

-- 
Regards,
Li
--------------------------------------
Mengyang Li / Computer Science, SUNYSB

6315047325/ li.mengyang@stonybrook.edu

[-- Attachment #1.2: Type: text/html, Size: 1385 bytes --]

[-- Attachment #2: 0001-overlayfs-Add-support-for-overlayfs.patch --]
[-- Type: text/x-patch, Size: 2143 bytes --]

From 4efafe0f4311bc9140a667370576fde24b84fecb Mon Sep 17 00:00:00 2001
From: Mengyang Li <li.mengyang@stonybrook.edu>
Date: Sat, 15 Nov 2014 10:53:41 -0500
Subject: [PATCH 1/1] overlayfs: Add support for overlayfs


Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
 common/rc                |   21 +++++++++++++++++++++
 configs/overlayfs.config |   16 ++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 configs/overlayfs.config

diff --git a/common/rc b/common/rc
index d5e3aff..efa0fac 100644
--- a/common/rc
+++ b/common/rc
@@ -1133,6 +1133,24 @@ _require_test()
 		    _notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV"
 		fi
 		;;
+	overlayfs)
+		if [ -z "$OVLFS_LOWERDIR" -o ! -d "$OVLFS_LOWERDIR" ];
+		then
+		    _notrun "this test requires a valid \$OVLFS_LOWERDIR"
+		fi
+		if [ -z "$OVLFS_UPPERDIR" -o ! -d "$OVLFS_UPPERDIR" ];
+		then
+		    _notrun "this test requires a valid \$OVLFS_UPPERDIR"
+		fi
+		if [ -z "$OVLFS_WORKDIR" -o ! -d "$OVLFS_WORKDIR" ];
+		then
+		    _notrun "this test requires a valid \$OVLFS_WORKDIR"
+		fi
+		if [ -z "$TEST_DIR" -o ! -d "$TEST_DIR" ];
+		then
+		    _notrun "this test requires a valid \$TEST_DIR"
+		fi
+		;;
 	*)
 		 if [ -z "$TEST_DEV" -o "`_is_block_dev $TEST_DEV`" = "" ]
 		 then
@@ -1947,6 +1965,9 @@ _check_test_fs()
     tmpfs)
 	# no way to check consistency for tmpfs
 	;;
+    overlayfs)
+	# no way to check consistency for overlayfs
+	;;
     *)
 	_check_generic_filesystem $TEST_DEV
 	;;
diff --git a/configs/overlayfs.config b/configs/overlayfs.config
new file mode 100644
index 0000000..42ef975
--- /dev/null
+++ b/configs/overlayfs.config
@@ -0,0 +1,16 @@
+# Example config for overlayfs
+# source me before run ./check
+
+export OVLFS_LOWERDIR=/mnt/ovllower
+export OVLFS_UPPERDIR=/mnt/ovlupper
+export OVLFS_WORKDIR=/mnt/workdir
+
+export TEST_DIR=/mnt/merged
+export TEST_DEV=/dev/loop0
+
+export TEST_FS_MOUNT_OPTS=-olowerdir=$OVLFS_LOWERDIR,\
+upperdir=$OVLFS_UPPERDIR,workdir=$OVLFS_WORKDIR
+
+unset SCRATCH_DEV
+unset SCRATCH_MNT
+export FSTYP=overlayfs
-- 
1.7.9.5


[-- Attachment #3: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-01  5:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-15 20:41 Support overlayfs testing Li Mengyang
2014-12-01  5:08 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox