linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Zorro Lang <zlang@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH 2/4] overlay: fix regression in _repair_overlay_scratch_fs
Date: Mon, 26 May 2025 16:34:57 +0200	[thread overview]
Message-ID: <20250526143500.1520660-3-amir73il@gmail.com> (raw)
In-Reply-To: <20250526143500.1520660-1-amir73il@gmail.com>

_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")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 common/overlay    | 2 ++
 tests/generic/330 | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/overlay b/common/overlay
index 2e36fa3d..f05f8180 100644
--- a/common/overlay
+++ b/common/overlay
@@ -433,6 +433,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


  parent reply	other threads:[~2025-05-26 14:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26 14:34 [PATCH 0/4] fstests overlay fixes for v2025.05.25 Amir Goldstein
2025-05-26 14:34 ` [PATCH 1/4] overlay: workaround libmount failure to remount,ro Amir Goldstein
2025-05-27 14:48   ` Miklos Szeredi
2025-05-28  6:54     ` Amir Goldstein
2025-05-28  8:47       ` Karel Zak
2025-05-28  9:56         ` Miklos Szeredi
2025-05-28 10:54           ` Karel Zak
2025-05-28 11:47             ` Miklos Szeredi
2025-05-28 13:13               ` Karel Zak
2025-05-28 13:27                 ` Miklos Szeredi
2025-05-28 10:58           ` Amir Goldstein
2025-05-26 14:34 ` Amir Goldstein [this message]
2025-05-26 14:34 ` [PATCH 3/4] generic/604: do not run with overlayfs Amir Goldstein
2025-05-26 14:34 ` [PATCH 3/4] generic/604: opt-out " Amir Goldstein
2025-05-26 14:35 ` [PATCH 4/4] generic/623: do not run " Amir Goldstein
2025-05-26 17:05 ` [PATCH 0/4] fstests overlay fixes for v2025.05.25 André Almeida
2025-05-27  9:11   ` 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=20250526143500.1520660-3-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=zlang@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).