All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: "Darrick J . Wong" <darrick.wong@oracle.com>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH] overlay: fix _scratch_remount with xfs_info 5.0.0
Date: Mon, 17 Jun 2019 16:58:43 +0300	[thread overview]
Message-ID: <20190617135843.12659-1-amir73il@gmail.com> (raw)

xfs_info version 5.0.0 started using findmnt to find the
filesystem to query. This change resulted in a regression
of _scratch_remount when testing overlay over xfs.
For example, test overlay/035, started to report:
[not run] overlay/035 -- upper fs needs to support d_type

Internally, '_overlay_scratch_mount -o remount' calls
'_supports_filetype $OVL_BASE_SCRATCH_MNT -o remount'
and with the following example mounts:

/dev/vdf /vdf xfs rw,relatime,attr2,inode64,noquota 0 0
/vdf /vdf/ovl-mnt overlay rw,lowerdir=/vdf/lower,upperdir=/vdf/upper...

'_supports_filetype /vdf' returns false and reports:
"/vdf/ovl-mnt: Not on a mounted XFS filesystem".

Regardless of the change in xfs_info, which I proposed a fix
for, there is no reason to test d_type support on remount.
Therefore, fix the regression by skipping unneeded overlayfs
mount logic on remount.

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

Eryu,

I think this fix is desired regardless of the proposed
xfs_info fix [1].

Thanks,
Amir.

[1] https://marc.info/?l=linux-xfs&m=156077152313826&w=2

 common/overlay | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/overlay b/common/overlay
index 00946a94..65c639e9 100644
--- a/common/overlay
+++ b/common/overlay
@@ -105,6 +105,11 @@ _overlay_base_scratch_mount()
 
 _overlay_scratch_mount()
 {
+	if echo "$*" | grep -q remount; then
+		$MOUNT_PROG $SCRATCH_MNT $*
+		return
+	fi
+
 	_overlay_base_scratch_mount && \
 		_overlay_mount $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT $*
 }
-- 
2.17.1

                 reply	other threads:[~2019-06-17 13:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190617135843.12659-1-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.