fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] overlay/073: test with nfs_export being off
@ 2020-09-10  5:51 Murphy Zhou
  2020-09-10 13:59 ` Amir Goldstein
  0 siblings, 1 reply; 7+ messages in thread
From: Murphy Zhou @ 2020-09-10  5:51 UTC (permalink / raw)
  To: Chengguang Xu, Miklos Szeredi, Amir Goldstein; +Cc: linux-unionfs, fstests

When nfs_export is enabled, the link count of upper dir
objects are more then the expected number in this testcase.
Because extra index entries are linked to upper inodes.

 QA output created by 073
+Expected link count is 12 but real count is 23, file name is dir
+Expected link count is 12 but real count is 23, file name is 1
...
+Expected link count is 12 but real count is 23, file name is 10
 Silence is golden

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
Hi folks,

Please help review that with nfs_export enabled, this is expected.
I think so but I'm not 100% sure about it. Maybe it's a bug in
the kernel.

Thanks.

 tests/overlay/073 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/overlay/073 b/tests/overlay/073
index 37860c92..b78551eb 100755
--- a/tests/overlay/073
+++ b/tests/overlay/073
@@ -99,7 +99,7 @@ run_test_case()
 {
 	_scratch_mkfs
 	make_lower_files ${1}
-	_scratch_mount -o "index=on"
+	_scratch_mount -o "index=on,nfs_export=off"
 	make_whiteout_files
 	check_whiteout_files ${1} ${2}
 	_scratch_unmount
-- 
2.20.1


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

* Re: [PATCH] overlay/073: test with nfs_export being off
  2020-09-10  5:51 [PATCH] overlay/073: test with nfs_export being off Murphy Zhou
@ 2020-09-10 13:59 ` Amir Goldstein
  2020-09-11  2:18   ` [PATCH v2] " Murphy Zhou
  0 siblings, 1 reply; 7+ messages in thread
From: Amir Goldstein @ 2020-09-10 13:59 UTC (permalink / raw)
  To: Murphy Zhou; +Cc: Chengguang Xu, Miklos Szeredi, overlayfs, fstests

On Thu, Sep 10, 2020 at 8:51 AM Murphy Zhou <jencce.kernel@gmail.com> wrote:
>
> When nfs_export is enabled, the link count of upper dir
> objects are more then the expected number in this testcase.
> Because extra index entries are linked to upper inodes.
>
>  QA output created by 073
> +Expected link count is 12 but real count is 23, file name is dir
> +Expected link count is 12 but real count is 23, file name is 1
> ...
> +Expected link count is 12 but real count is 23, file name is 10
>  Silence is golden
>
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> ---
> Hi folks,
>
> Please help review that with nfs_export enabled, this is expected.
> I think so but I'm not 100% sure about it. Maybe it's a bug in
> the kernel.
>

Indeed this is expected.
With nfs_export, for every unlinked lower file/dir there is a whiteout
"tombstone" in the index directory, whose name is the file handle
of the unlinked inode.

So this test creates extra 11 tombstones with nfs_export enabled.

> Thanks.
>
>  tests/overlay/073 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/overlay/073 b/tests/overlay/073
> index 37860c92..b78551eb 100755
> --- a/tests/overlay/073
> +++ b/tests/overlay/073
> @@ -99,7 +99,7 @@ run_test_case()
>  {
>         _scratch_mkfs
>         make_lower_files ${1}
> -       _scratch_mount -o "index=on"
> +       _scratch_mount -o "index=on,nfs_export=off"

So the fix looks fine, but let's document why nfs_export=off is needed.

Thanks,
Amir.

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

* [PATCH v2] overlay/073: test with nfs_export being off
  2020-09-10 13:59 ` Amir Goldstein
@ 2020-09-11  2:18   ` Murphy Zhou
  2020-09-11  2:27     ` Amir Goldstein
  2020-10-20  2:52     ` Murphy Zhou
  0 siblings, 2 replies; 7+ messages in thread
From: Murphy Zhou @ 2020-09-11  2:18 UTC (permalink / raw)
  To: Amir Goldstein, fstests
  Cc: Murphy Zhou, Chengguang Xu, Miklos Szeredi, overlayfs

When nfs_export is enabled, the link count of upper dir
objects are more then the expected number in this testcase.
Because extra index entries are linked to upper inodes.

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
 tests/overlay/073 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/overlay/073 b/tests/overlay/073
index 37860c92..c5deccc6 100755
--- a/tests/overlay/073
+++ b/tests/overlay/073
@@ -99,7 +99,9 @@ run_test_case()
 {
 	_scratch_mkfs
 	make_lower_files ${1}
-	_scratch_mount -o "index=on"
+	# There will be extra hard links with nfs_export enabled which
+	# is expected. Turn it off explicitly to avoid the false alarm.
+	_scratch_mount -o "index=on,nfs_export=off"
 	make_whiteout_files
 	check_whiteout_files ${1} ${2}
 	_scratch_unmount
-- 
2.20.1


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

* Re: [PATCH v2] overlay/073: test with nfs_export being off
  2020-09-11  2:18   ` [PATCH v2] " Murphy Zhou
@ 2020-09-11  2:27     ` Amir Goldstein
  2020-10-20  2:52     ` Murphy Zhou
  1 sibling, 0 replies; 7+ messages in thread
From: Amir Goldstein @ 2020-09-11  2:27 UTC (permalink / raw)
  To: Murphy Zhou; +Cc: fstests, Chengguang Xu, Miklos Szeredi, overlayfs

On Fri, Sep 11, 2020 at 5:18 AM Murphy Zhou <jencce.kernel@gmail.com> wrote:
>
> When nfs_export is enabled, the link count of upper dir
> objects are more then the expected number in this testcase.
> Because extra index entries are linked to upper inodes.
>
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>

Reviewed-by: Amir Goldstein <amir73il@gmail.com>

> ---
>  tests/overlay/073 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/overlay/073 b/tests/overlay/073
> index 37860c92..c5deccc6 100755
> --- a/tests/overlay/073
> +++ b/tests/overlay/073
> @@ -99,7 +99,9 @@ run_test_case()
>  {
>         _scratch_mkfs
>         make_lower_files ${1}
> -       _scratch_mount -o "index=on"
> +       # There will be extra hard links with nfs_export enabled which
> +       # is expected. Turn it off explicitly to avoid the false alarm.
> +       _scratch_mount -o "index=on,nfs_export=off"
>         make_whiteout_files
>         check_whiteout_files ${1} ${2}
>         _scratch_unmount
> --
> 2.20.1
>

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

* Re: [PATCH v2] overlay/073: test with nfs_export being off
  2020-09-11  2:18   ` [PATCH v2] " Murphy Zhou
  2020-09-11  2:27     ` Amir Goldstein
@ 2020-10-20  2:52     ` Murphy Zhou
  2020-10-20  5:22       ` Eryu Guan
  1 sibling, 1 reply; 7+ messages in thread
From: Murphy Zhou @ 2020-10-20  2:52 UTC (permalink / raw)
  To: Murphy Zhou
  Cc: Amir Goldstein, fstests, Chengguang Xu, Miklos Szeredi, overlayfs

Ping on this one.

On Fri, Sep 11, 2020 at 10:18:13AM +0800, Murphy Zhou wrote:
> When nfs_export is enabled, the link count of upper dir
> objects are more then the expected number in this testcase.
> Because extra index entries are linked to upper inodes.
> 
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> ---
>  tests/overlay/073 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/overlay/073 b/tests/overlay/073
> index 37860c92..c5deccc6 100755
> --- a/tests/overlay/073
> +++ b/tests/overlay/073
> @@ -99,7 +99,9 @@ run_test_case()
>  {
>  	_scratch_mkfs
>  	make_lower_files ${1}
> -	_scratch_mount -o "index=on"
> +	# There will be extra hard links with nfs_export enabled which
> +	# is expected. Turn it off explicitly to avoid the false alarm.
> +	_scratch_mount -o "index=on,nfs_export=off"
>  	make_whiteout_files
>  	check_whiteout_files ${1} ${2}
>  	_scratch_unmount
> -- 
> 2.20.1
> 

-- 
Murphy

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

* Re: [PATCH v2] overlay/073: test with nfs_export being off
  2020-10-20  2:52     ` Murphy Zhou
@ 2020-10-20  5:22       ` Eryu Guan
  2020-10-23  0:31         ` Murphy Zhou
  0 siblings, 1 reply; 7+ messages in thread
From: Eryu Guan @ 2020-10-20  5:22 UTC (permalink / raw)
  To: Murphy Zhou
  Cc: Amir Goldstein, fstests, Chengguang Xu, Miklos Szeredi, overlayfs

On Tue, Oct 20, 2020 at 10:52:59AM +0800, Murphy Zhou wrote:
> Ping on this one.

Queued for next update.

Sorry, I thought I've applied it and pushed, but clearly I didn't.
Thanks for the reminder!

Thanks,
Eryu

> 
> On Fri, Sep 11, 2020 at 10:18:13AM +0800, Murphy Zhou wrote:
> > When nfs_export is enabled, the link count of upper dir
> > objects are more then the expected number in this testcase.
> > Because extra index entries are linked to upper inodes.
> > 
> > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> > ---
> >  tests/overlay/073 | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tests/overlay/073 b/tests/overlay/073
> > index 37860c92..c5deccc6 100755
> > --- a/tests/overlay/073
> > +++ b/tests/overlay/073
> > @@ -99,7 +99,9 @@ run_test_case()
> >  {
> >  	_scratch_mkfs
> >  	make_lower_files ${1}
> > -	_scratch_mount -o "index=on"
> > +	# There will be extra hard links with nfs_export enabled which
> > +	# is expected. Turn it off explicitly to avoid the false alarm.
> > +	_scratch_mount -o "index=on,nfs_export=off"
> >  	make_whiteout_files
> >  	check_whiteout_files ${1} ${2}
> >  	_scratch_unmount
> > -- 
> > 2.20.1
> > 
> 
> -- 
> Murphy

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

* Re: [PATCH v2] overlay/073: test with nfs_export being off
  2020-10-20  5:22       ` Eryu Guan
@ 2020-10-23  0:31         ` Murphy Zhou
  0 siblings, 0 replies; 7+ messages in thread
From: Murphy Zhou @ 2020-10-23  0:31 UTC (permalink / raw)
  To: Eryu Guan
  Cc: Murphy Zhou, Amir Goldstein, fstests, Chengguang Xu,
	Miklos Szeredi, overlayfs

On Tue, Oct 20, 2020 at 01:22:29PM +0800, Eryu Guan wrote:
> On Tue, Oct 20, 2020 at 10:52:59AM +0800, Murphy Zhou wrote:
> > Ping on this one.
> 
> Queued for next update.
> 
> Sorry, I thought I've applied it and pushed, but clearly I didn't.
> Thanks for the reminder!

No warries :)

> 
> Thanks,
> Eryu
> 
> > 
> > On Fri, Sep 11, 2020 at 10:18:13AM +0800, Murphy Zhou wrote:
> > > When nfs_export is enabled, the link count of upper dir
> > > objects are more then the expected number in this testcase.
> > > Because extra index entries are linked to upper inodes.
> > > 
> > > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> > > ---
> > >  tests/overlay/073 | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/tests/overlay/073 b/tests/overlay/073
> > > index 37860c92..c5deccc6 100755
> > > --- a/tests/overlay/073
> > > +++ b/tests/overlay/073
> > > @@ -99,7 +99,9 @@ run_test_case()
> > >  {
> > >  	_scratch_mkfs
> > >  	make_lower_files ${1}
> > > -	_scratch_mount -o "index=on"
> > > +	# There will be extra hard links with nfs_export enabled which
> > > +	# is expected. Turn it off explicitly to avoid the false alarm.
> > > +	_scratch_mount -o "index=on,nfs_export=off"
> > >  	make_whiteout_files
> > >  	check_whiteout_files ${1} ${2}
> > >  	_scratch_unmount
> > > -- 
> > > 2.20.1
> > > 
> > 
> > -- 
> > Murphy

-- 
Murphy

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

end of thread, other threads:[~2020-10-23  0:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  5:51 [PATCH] overlay/073: test with nfs_export being off Murphy Zhou
2020-09-10 13:59 ` Amir Goldstein
2020-09-11  2:18   ` [PATCH v2] " Murphy Zhou
2020-09-11  2:27     ` Amir Goldstein
2020-10-20  2:52     ` Murphy Zhou
2020-10-20  5:22       ` Eryu Guan
2020-10-23  0:31         ` Murphy Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).