From: Eryu Guan <eguan@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 2/5] overlay/014: fix test with inodes index enabled
Date: Wed, 12 Jul 2017 18:36:42 +0800 [thread overview]
Message-ID: <20170712103642.GC7015@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1499802726-11045-3-git-send-email-amir73il@gmail.com>
On Tue, Jul 11, 2017 at 10:52:03PM +0300, Amir Goldstein wrote:
> When overlayfs is configured with CONFIG_OVERLAY_FS_INDEX=y,
> workdir from previous overlay mount cannot be reused in a new
> overlay mount that uses a different upper dir.
>
> Fix the test to use a different workdir when mounting with a
> different upper dir.
>
> This change has not effect on older kernels and overlay
> configured without CONFIG_OVERLAY_FS_INDEX.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> tests/overlay/014 | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/overlay/014 b/tests/overlay/014
> index 40d10f5..6a551b7 100755
> --- a/tests/overlay/014
> +++ b/tests/overlay/014
> @@ -63,12 +63,13 @@ lowerdir1=$OVL_BASE_SCRATCH_MNT/lower1
> lowerdir2=$OVL_BASE_SCRATCH_MNT/lower2
> upperdir=$OVL_BASE_SCRATCH_MNT/upper
> workdir=$OVL_BASE_SCRATCH_MNT/workdir
> -mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir
I added some comments before creating workdir2 (mostly copied from your
overlay document patch), please let me know if you have different
thoughts.
+# When overlay inode index feature is enabled, using an upper layer path and/or
+# a workdir path that are already used by another overlay mount is not allowed
+# and will fail with EBUSY, so create another workdir for the second overlay
+# mount
> +workdir2=$OVL_BASE_SCRATCH_MNT/workdir2
> +mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir $workdir2
> mkdir -p $lowerdir1/testdir/d
Thanks,
Eryu
>
> # mount overlay with $lowerdir2 as upperdir, and remove & recreate testdir,
> # make testdir on $lowerdir2 opaque
> -_overlay_mount_dirs $lowerdir1 $lowerdir2 $workdir $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
> +_overlay_mount_dirs $lowerdir1 $lowerdir2 $workdir2 $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
> rm -rf $SCRATCH_MNT/testdir
> mkdir -p $SCRATCH_MNT/testdir/visibledir
> # unmount overlayfs but not base fs
> --
> 2.7.4
>
next prev parent reply other threads:[~2017-07-12 10:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 19:52 [PATCH 0/5] overlay mount tests Amir Goldstein
2017-07-11 19:52 ` [PATCH 1/5] overlay/014: remove unneeded require and include Amir Goldstein
2017-07-11 19:52 ` [PATCH 2/5] overlay/014: fix test with inodes index enabled Amir Goldstein
2017-07-12 10:36 ` Eryu Guan [this message]
2017-07-12 10:45 ` Amir Goldstein
2017-07-11 19:52 ` [PATCH 3/5] overlay: create overlay/mount test group Amir Goldstein
2017-07-11 19:52 ` [PATCH 4/5] overlay: test cases that force read-only mount Amir Goldstein
2017-07-12 10:31 ` Eryu Guan
2017-07-12 10:37 ` Amir Goldstein
2017-07-11 19:52 ` [PATCH 5/5] overlay: test mount error cases with exclusive directories Amir Goldstein
2017-07-12 10:47 ` Eryu Guan
2017-07-12 11:08 ` Amir Goldstein
2017-07-12 11:46 ` Eryu Guan
2017-07-12 11:53 ` Amir Goldstein
2017-07-12 12:07 ` [PATCH v2 " Amir Goldstein
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=20170712103642.GC7015@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=amir73il@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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