All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH 1/2] common/rc: introduce _overlay_mount_dirs helper
Date: Thu, 1 Sep 2016 11:33:35 +0800	[thread overview]
Message-ID: <20160901033335.GY27776@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20160901001629.GA30056@dastard>

On Thu, Sep 01, 2016 at 10:16:29AM +1000, Dave Chinner wrote:
> On Tue, Aug 09, 2016 at 07:16:20PM +0800, Eryu Guan wrote:
> > Introduce a new _overlay_mount_dirs() helper to do the actual
> > overlay mount operation and factor _overlay_scratch_mount and
> > _overlay_mount code to use a single implemention of
> > _overlay_mount_dirs(). Also convert all bare mount of overlay in
> > tests to use it.
> > 
> > Suggested-by: Dave Chinner <dchinner@redhat.com>
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
> >  common/rc         | 21 +++++++++++++++------
> >  tests/overlay/005 |  6 ++----
> >  tests/overlay/010 |  5 ++---
> >  3 files changed, 19 insertions(+), 13 deletions(-)
> > 
> > diff --git a/common/rc b/common/rc
> > index b19b698..6c1c3ff 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -266,6 +266,18 @@ _scratch_mount_options()
> >  					$SCRATCH_DEV $SCRATCH_MNT
> >  }
> >  
> > +# helper function to do the actual overlayfs mount operation
> > +_overlay_mount_dirs()
> > +{
> > +	local lowerdir=$1
> > +	local upperdir=$2
> > +	local workdir=$3
> > +	shift 3
> > +
> > +	$MOUNT_PROG -t overlay -o lowerdir=$lowerdir -o upperdir=$upperdir \
> > +		    -o workdir=$workdir $*
> > +}
> > +
> >  # Given a dir, set up 3 subdirectories and mount on the given mnt.
> >  # The dir is used as the mount device so it can be seen from df or mount
> >  _overlay_mount()
> > @@ -293,12 +305,9 @@ _overlay_mount()
> >  	mkdir -p $dir/$OVERLAY_LOWER_DIR
> >  	mkdir -p $dir/$OVERLAY_WORK_DIR
> >  
> > -	$MOUNT_PROG -t overlay $SELINUX_MOUNT_OPTIONS \
> > -		    -o lowerdir=$dir/$OVERLAY_LOWER_DIR \
> > -		    -o upperdir=$dir/$OVERLAY_UPPER_DIR \
> > -		    -o workdir=$dir/$OVERLAY_WORK_DIR   \
> > -		    $OVERLAY_MOUNT_OPTIONS $* \
> > -		    $dir $mnt
> > +	_overlay_mount_dirs $dir/$OVERLAY_LOWER_DIR $dir/$OVERLAY_UPPER_DIR \
> > +			    $dir/$OVERLAY_WORK_DIR $OVERLAY_MOUNT_OPTIONS $* \
> > +			    $dir $mnt
> 
> This drops SELINUX_MOUNT_OPTIONS from the mount options. I'd suggest

This is unexpected, it's dropped by mistake..

> this option should be moved inside _overlay_mount_dirs() so they are
> always applied to overlayfs mounts if set.

Sure, will do.

Thanks a lot for the review!

Eryu

      reply	other threads:[~2016-09-01  3:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 11:16 [PATCH 1/2] common/rc: introduce _overlay_mount_dirs helper Eryu Guan
2016-08-09 11:16 ` [PATCH v2 2/2] overlay: copy-up lowerdir which has opaque xattr set Eryu Guan
2016-09-01  0:22   ` Dave Chinner
2016-09-01  3:56     ` Eryu Guan
2016-08-12  3:33 ` [PATCH 1/2] common/rc: introduce _overlay_mount_dirs helper Eryu Guan
2016-08-19  3:05   ` Eryu Guan
2016-08-25  4:11     ` Eryu Guan
2016-08-31  9:44       ` Eryu Guan
2016-09-01  0:16 ` Dave Chinner
2016-09-01  3:33   ` Eryu Guan [this message]

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=20160901033335.GY27776@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --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.