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@xxxxxxxxxxxxxx
From 4efafe0f4311bc9140a667370576fde24b84fecb Mon Sep 17 00:00:00 2001 From: Mengyang Li <li.mengyang@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> Signed-off-by: Erez Zadok <ezk@xxxxxxxxxxxxx> --- 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
_______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs