FS/XFS testing framework
 help / color / mirror / Atom feed
From: Eryu Guan <guan@eryu.me>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Eryu Guan <guaneryu@gmail.com>,
	Chengguang Xu <cgxu519@mykernel.net>,
	Miklos Szeredi <miklos@szeredi.hu>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] overlay/029: fix test failure with index feature enabled
Date: Mon, 20 Apr 2020 00:06:35 +0800	[thread overview]
Message-ID: <20200419160635.GI388005@desktop> (raw)
In-Reply-To: <20200409112900.15341-1-amir73il@gmail.com>

On Thu, Apr 09, 2020 at 02:29:00PM +0300, Amir Goldstein wrote:
> When overlayfs index feature is enabled by default in either kernel
> config or module parameters, this test fails:
> 
>     mount: /tmp/8751/mnt: mount(2) system call failed: Stale file handle.
>     cat: /tmp/8751/mnt/bar: No such file or directory
> 
> The reason is that with index feature enabled, an upper/work dirs cannot
> be reused for mounting with a different lower layer.

I re-built my test kernel with CONFIG_OVERLAY_FS_INDEX=y, and confirmed
/sys/module/overlay/parameters/index is 'Y', but test still passes for
me. And I do notice the following info in dmesg:

[  598.663923] overlayfs: fs on '/mnt/scratch/ovl-mnt/up' does not support file handles, falling back to index=off,nfs_export=off.
[  598.674299] overlayfs: fs on '/mnt/scratch/ovl-mnt/low' does not support file handles, falling back to index=off,nfs_export=off.
[  598.684594] overlayfs: fs on '/mnt/scratch/ovl-mnt/' does not support file handles, falling back to index=off,nfs_export=off.

Seems it has something to do with nfs_export feature? I have it disabled
by default.

 # CONFIG_OVERLAY_FS_NFS_EXPORT is not set

Could you please help confirm?

Thanks,
Eryu

> 
> Reported-by: Chengguang Xu <cgxu519@mykernel.net>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
>  tests/overlay/029 | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tests/overlay/029 b/tests/overlay/029
> index 1d2d2092..17f58de7 100755
> --- a/tests/overlay/029
> +++ b/tests/overlay/029
> @@ -68,12 +68,18 @@ _overlay_mount_dirs $SCRATCH_MNT/up $tmp/{upper,work} \
>  cat $tmp/mnt/foo
>  $UMOUNT_PROG $tmp/mnt
>  
> +# re-create upper/work to avoid ovl_verify_origin() mount failure
> +# when index is enabled
> +rm -rf $tmp/{upper,work}
> +mkdir -p $tmp/{upper,work}
>  # mount overlay again using lower dir from SCRATCH_MNT dir
>  _overlay_mount_dirs $SCRATCH_MNT/low $tmp/{upper,work} \
>    overlay $tmp/mnt
>  cat $tmp/mnt/bar
>  $UMOUNT_PROG $tmp/mnt
>  
> +rm -rf $tmp/{upper,work}
> +mkdir -p $tmp/{upper,work}
>  # mount overlay again using SCRATCH_MNT dir
>  _overlay_mount_dirs $SCRATCH_MNT/ $tmp/{upper,work} \
>    overlay $tmp/mnt
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-04-19 16:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 11:29 [PATCH] overlay/029: fix test failure with index feature enabled Amir Goldstein
2020-04-19 16:06 ` Eryu Guan [this message]
2020-04-19 16:12   ` Amir Goldstein
2020-04-19 17:01     ` Eryu Guan
2020-04-19 17:54       ` 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=20200419160635.GI388005@desktop \
    --to=guan@eryu.me \
    --cc=amir73il@gmail.com \
    --cc=cgxu519@mykernel.net \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --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