linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 4/4] overlay: fix _overlay_config_override of MOUNT_OPTIONS
Date: Wed, 11 Oct 2017 19:50:20 +0800	[thread overview]
Message-ID: <20171011115020.GW10593@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1506495852-7295-5-git-send-email-amir73il@gmail.com>

On Wed, Sep 27, 2017 at 10:04:12AM +0300, Amir Goldstein wrote:
> The config variable OVERLAY_MOUNT_OPTIONS is used to configure
> the overlay mount options when running ./check -overlay.
> The config variable MOUNT_OPTIONS is used to configure the
> mount options for base fs.
> 
> If config sets value of OVERLAY_MOUNT_OPTIONS and
> does not set MOUNT_OPTIONS, the value of MOUNT_OPTIONS
> may be leftover from previous _overlay_config_override, so
> don't use that value for base fs mount.
> 
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
>  common/config | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/common/config b/common/config
> index 71798f0..8844173 100644
> --- a/common/config
> +++ b/common/config
> @@ -532,6 +532,10 @@ _overlay_config_override()
>  	# Store original base fs vars
>  	export OVL_BASE_TEST_DEV="$TEST_DEV"
>  	export OVL_BASE_TEST_DIR="$TEST_DIR"
> +	# If config does not set MOUNT_OPTIONS, its value may be
> +	# leftover from previous _overlay_config_override, so
> +	# don't use that value for base fs mount
> +	[ "$MOUNT_OPTIONS" != "$OVERLAY_MOUNT_OPTIONS" ] || unset MOUNT_OPTIONS
>  	export OVL_BASE_MOUNT_OPTIONS="$MOUNT_OPTIONS"

Hmm, I don't like the idea that specify mount options for base fs
through MOUNT_OPTIONS. With this, we can only specify overlay mount
options via OVERLAY_MOUNT_OPTIONS but not MOUNT_OPTIONS. Ideally, I'd
like both of them work, and OVERLAY_MOUNT_OPTIONS is assigned to
MOUNT_OPTIONS when the latter is empty.

I think MOUNT_OPTIONS and TEST_FS_MOUNT_OPTS should always be the mount
options for filesystem we're currently testing (overlay in this case)
not something else.

OTOH, We can always specify OVL_BASE_MOUNT_OPTIONS directly for base fs
mount options if we want.

But this problem has nothing to do with this patchset, it goes back to
the time when overlay supports base test/scratch dev, so I'm fine with
this patch going in right now.

Thanks,
Eryu

>  
>  	# Set TEST vars to overlay base and mount dirs inside base fs
> -- 
> 2.7.4
> 

  reply	other threads:[~2017-10-11 11:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27  7:04 [PATCH 0/4] fstests: fixes for config option OVERLAY_MOUNT_OPTIONS Amir Goldstein
2017-09-27  7:04 ` [PATCH 1/4] overlay: remove stale implementation of _scratch_mount_options Amir Goldstein
2017-09-27  7:04 ` [PATCH 2/4] overlay: use default overlay mount options _overlay_mount_dirs() Amir Goldstein
2017-09-27  7:50   ` Amir Goldstein
2017-09-27  8:05     ` Eryu Guan
2017-10-12  6:08       ` Eryu Guan
2017-10-11 11:33   ` Eryu Guan
2017-09-27  7:04 ` [PATCH 3/4] overlay: create helper _overlay_scratch_mount_dirs() Amir Goldstein
2017-09-27  7:04 ` [PATCH 4/4] overlay: fix _overlay_config_override of MOUNT_OPTIONS Amir Goldstein
2017-10-11 11:50   ` Eryu Guan [this message]
2017-10-11 12:35     ` Amir Goldstein
2017-09-27 10:47 ` [PATCH 5/5] overlay: move _overlay helpers to common/overlay Amir Goldstein
2017-09-28 11:55 ` [PATCH 6/6] overlay: deduplicate code in overlay mount helpers Amir Goldstein
2017-09-29  1:44   ` Eryu Guan

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=20171011115020.GW10593@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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).