* [PATCH 0/2] overlay: fix INDEX=y regressions
@ 2017-09-19 11:39 Amir Goldstein
2017-09-19 11:39 ` [PATCH 1/2] overlay/014: correct comment relating to workdir reuse Amir Goldstein
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Amir Goldstein @ 2017-09-19 11:39 UTC (permalink / raw)
To: Eryu Guan; +Cc: Miklos Szeredi, linux-unionfs, fstests
Eryu,
When you added the comment to overlay/014, I said Looks good to me,
but I wasn't looking well.
Second patch is the same treatment to overlay/031 (with the correct
comment).
Test overlay/031 does not pass on master, but with INDEX=y, it fails
on the wrong errors.
The test passes on my development branch:
https://github.com/amir73il/linux/commits/overlayfs-devel
Amir.
Amir Goldstein (2):
overlay/014: correct comment relating to workdir reuse
overlay/031: fix test with inodes index enabled
tests/overlay/014 | 7 +++----
tests/overlay/031 | 23 ++++++++++++++++-------
2 files changed, 19 insertions(+), 11 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] overlay/014: correct comment relating to workdir reuse
2017-09-19 11:39 [PATCH 0/2] overlay: fix INDEX=y regressions Amir Goldstein
@ 2017-09-19 11:39 ` Amir Goldstein
2017-09-19 11:39 ` [PATCH 2/2] overlay/031: fix test with inodes index enabled Amir Goldstein
2017-09-20 3:53 ` [PATCH 0/2] overlay: fix INDEX=y regressions Eryu Guan
2 siblings, 0 replies; 5+ messages in thread
From: Amir Goldstein @ 2017-09-19 11:39 UTC (permalink / raw)
To: Eryu Guan; +Cc: Miklos Szeredi, linux-unionfs, fstests
Clarification: EBUSY is what you get when trying to use the same
upperdir/workdir with two different *concurent* overlayfs mounts.
The EBUSY case is independent of the inodes index feature.
This is not the case in this test, but rather the case of trying
to reuse the same workdir with different upper dirs on *subsequent*
overlayfs mounts.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
tests/overlay/014 | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/overlay/014 b/tests/overlay/014
index f228b15..cd76835 100755
--- a/tests/overlay/014
+++ b/tests/overlay/014
@@ -63,10 +63,9 @@ lowerdir1=$OVL_BASE_SCRATCH_MNT/lower1
lowerdir2=$OVL_BASE_SCRATCH_MNT/lower2
upperdir=$OVL_BASE_SCRATCH_MNT/upper
workdir=$OVL_BASE_SCRATCH_MNT/workdir
-# 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
+# When overlay inode index feature is enabled, a workdir cannot be reused
+# with a different upperdir. workdir2 in this test is used as the workdir
+# when lowerdir2 is used as the upperdir.
workdir2=$OVL_BASE_SCRATCH_MNT/workdir2
mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir $workdir2
mkdir -p $lowerdir1/testdir/d
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] overlay/031: fix test with inodes index enabled
2017-09-19 11:39 [PATCH 0/2] overlay: fix INDEX=y regressions Amir Goldstein
2017-09-19 11:39 ` [PATCH 1/2] overlay/014: correct comment relating to workdir reuse Amir Goldstein
@ 2017-09-19 11:39 ` Amir Goldstein
2017-09-19 13:02 ` zhangyi (F)
2017-09-20 3:53 ` [PATCH 0/2] overlay: fix INDEX=y regressions Eryu Guan
2 siblings, 1 reply; 5+ messages in thread
From: Amir Goldstein @ 2017-09-19 11:39 UTC (permalink / raw)
To: Eryu Guan; +Cc: Miklos Szeredi, linux-unionfs, fstests, zhangyi
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 no effect on older kernels and overlay
configured without CONFIG_OVERLAY_FS_INDEX.
Cc: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
tests/overlay/031 | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/tests/overlay/031 b/tests/overlay/031
index 161022e..70ee299 100755
--- a/tests/overlay/031
+++ b/tests/overlay/031
@@ -43,12 +43,17 @@ _cleanup()
# testfile to create a whiteout in upper dir.
create_whiteout()
{
- mkdir -p $1/testdir
- touch $1/testdir/$4
+ local lower=$1
+ local upper=$2
+ local work=$3
+ local file=$4
- _overlay_mount_dirs $1 $2 $3 $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
+ mkdir -p $lower/testdir
+ touch $lower/testdir/$file
- rm -f $SCRATCH_MNT/testdir/$4
+ _overlay_mount_dirs $lower $upper $work $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
+
+ rm -f $SCRATCH_MNT/testdir/$file
$UMOUNT_PROG $SCRATCH_MNT
}
@@ -72,9 +77,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
+# When overlay inode index feature is enabled, a workdir cannot be reused
+# with a different upperdir. workdir1 in this test is used as the workdir
+# when lowerdir1 is used as the upperdir.
+workdir1=$OVL_BASE_SCRATCH_MNT/workdir1
testfile1=a
testfile2=b
-mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir
+mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir $workdir1
create_whiteout $lowerdir1 $upperdir $workdir $testfile1
@@ -108,7 +117,7 @@ $UMOUNT_PROG $SCRATCH_MNT
rm -rf $lowerdir1/testdir
rm -rf $upperdir/testdir
-create_whiteout $lowerdir2 $lowerdir1 $workdir $testfile1
+create_whiteout $lowerdir2 $lowerdir1 $workdir1 $testfile1
rm -rf $lowerdir2/testdir
@@ -128,7 +137,7 @@ create_whiteout $lowerdir1 $upperdir $workdir $testfile1
rm -rf $lowerdir1/testdir/$testfile1
-create_whiteout $lowerdir2 $lowerdir1 $workdir $testfile2
+create_whiteout $lowerdir2 $lowerdir1 $workdir1 $testfile2
_overlay_mount_dirs $lowerdir1 $upperdir $workdir $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] overlay/031: fix test with inodes index enabled
2017-09-19 11:39 ` [PATCH 2/2] overlay/031: fix test with inodes index enabled Amir Goldstein
@ 2017-09-19 13:02 ` zhangyi (F)
0 siblings, 0 replies; 5+ messages in thread
From: zhangyi (F) @ 2017-09-19 13:02 UTC (permalink / raw)
To: Amir Goldstein, Eryu Guan; +Cc: Miklos Szeredi, linux-unionfs, fstests
On 2017/9/19 19:39, 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 no effect on older kernels and overlay
> configured without CONFIG_OVERLAY_FS_INDEX.
>
> Cc: zhangyi (F) <yi.zhang@huawei.com>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> tests/overlay/031 | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
>
Looks good.
Thanks,
Yi.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] overlay: fix INDEX=y regressions
2017-09-19 11:39 [PATCH 0/2] overlay: fix INDEX=y regressions Amir Goldstein
2017-09-19 11:39 ` [PATCH 1/2] overlay/014: correct comment relating to workdir reuse Amir Goldstein
2017-09-19 11:39 ` [PATCH 2/2] overlay/031: fix test with inodes index enabled Amir Goldstein
@ 2017-09-20 3:53 ` Eryu Guan
2 siblings, 0 replies; 5+ messages in thread
From: Eryu Guan @ 2017-09-20 3:53 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Miklos Szeredi, linux-unionfs, fstests
On Tue, Sep 19, 2017 at 02:39:42PM +0300, Amir Goldstein wrote:
> Eryu,
>
> When you added the comment to overlay/014, I said Looks good to me,
> but I wasn't looking well.
> Second patch is the same treatment to overlay/031 (with the correct
> comment).
>
> Test overlay/031 does not pass on master, but with INDEX=y, it fails
> on the wrong errors.
> The test passes on my development branch:
> https://github.com/amir73il/linux/commits/overlayfs-devel
Thanks for all the fixes and clarifications! Queued for next update.
Eryu
>
> Amir.
>
> Amir Goldstein (2):
> overlay/014: correct comment relating to workdir reuse
> overlay/031: fix test with inodes index enabled
>
> tests/overlay/014 | 7 +++----
> tests/overlay/031 | 23 ++++++++++++++++-------
> 2 files changed, 19 insertions(+), 11 deletions(-)
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-20 3:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-19 11:39 [PATCH 0/2] overlay: fix INDEX=y regressions Amir Goldstein
2017-09-19 11:39 ` [PATCH 1/2] overlay/014: correct comment relating to workdir reuse Amir Goldstein
2017-09-19 11:39 ` [PATCH 2/2] overlay/031: fix test with inodes index enabled Amir Goldstein
2017-09-19 13:02 ` zhangyi (F)
2017-09-20 3:53 ` [PATCH 0/2] overlay: fix INDEX=y regressions Eryu Guan
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).