On Tue, Jun 03, 2025 at 12:07:41PM +0200, Amir Goldstein wrote: > _repair_overlay_scratch_fs assumed that the base fs is mounted. > This was a wrong assumption to make, and that was exposed by commit > 4c6bc456 ("fstests: clean up mount and unmount operations") that > converted open coded umount in generic/332 to _scratch_unmount. > > After this change, there errors were observed when running generic/332 > if fsck.overlay is installed: > > Check for damage > +fsck.overlay:[Error]: Faile to resolve upperdir:/vdf/ovl-upper: > No such file or directory > +fsck.overlay failed, err=8 > +umount: /vdf: not mounted. > > Fix this by making sure that base fs is mounted before running the > layers check and fix test generic/330 to conform with the umount > conversion patch. > > Fixes: 4c6bc456 ("fstests: clean up mount and unmount operations") > Tested-by: André Almeida <andrealmeid@xxxxxxxxxx> > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- Thanks for this regression fix from overlay. Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx> > common/overlay | 2 ++ > tests/generic/330 | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/common/overlay b/common/overlay > index 0fad6e70..0be943b1 100644 > --- a/common/overlay > +++ b/common/overlay > @@ -434,6 +434,8 @@ _check_overlay_scratch_fs() > > _repair_overlay_scratch_fs() > { > + # Base fs needs to be mounted for overlayfs check > + _overlay_base_scratch_mount > _overlay_fsck_dirs $OVL_BASE_SCRATCH_MNT/$OVL_LOWER \ > $OVL_BASE_SCRATCH_MNT/$OVL_UPPER \ > $OVL_BASE_SCRATCH_MNT/$OVL_WORK -y > diff --git a/tests/generic/330 b/tests/generic/330 > index c67defc4..901b17b1 100755 > --- a/tests/generic/330 > +++ b/tests/generic/330 > @@ -61,7 +61,7 @@ md5sum $testdir/file1 | _filter_scratch > md5sum $testdir/file2 | _filter_scratch > > echo "Check for damage" > -umount $SCRATCH_MNT > +_scratch_unmount > _repair_scratch_fs >> $seqres.full > > # success, all done > -- > 2.34.1 >