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 v2 2/2] overlay: copy-up lowerdir which has opaque xattr set
Date: Thu, 1 Sep 2016 11:56:22 +0800	[thread overview]
Message-ID: <20160901035622.GZ27776@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20160901002241.GB30056@dastard>

On Thu, Sep 01, 2016 at 10:22:41AM +1000, Dave Chinner wrote:
> On Tue, Aug 09, 2016 at 07:16:21PM +0800, Eryu Guan wrote:
> > When copying up a directory with opaque xattr set, the xattr was
> > copied up as well, after a remount the opaque flag is honored so the
> > copied-up directory is treated as opaque, which causes files created
> > in the lowerdir to be hidden when using multiple lower directories.
> > 
> > This is fixed by "ovl: don't copy up opaqueness".
> ....
> > +_scratch_mkfs
> > +
> > +# Create multiple lowerdirs and upperdir, workdir, and testdir on lowerdir
> > +lowerdir1=$SCRATCH_DEV/lower1
> > +lowerdir2=$SCRATCH_DEV/lower2
> > +upperdir=$SCRATCH_DEV/upper
> > +workdir=$SCRATCH_DEV/workdir
> > +mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir
> > +mkdir -p $lowerdir1/testdir/d
> > +
> > +# mount overlay with $lowerdir2 as upperdir, and remove & recreate testdir,
> > +# make testdir on $lowerdir2 opaque
> > +_overlay_mount_dirs $lowerdir1 $lowerdir2 $workdir none $SCRATCH_MNT
> 
> What is the "none" here? If _overlay_mount_dirs() doesn't require
> this parameter to have a specifically valid value, then why are
> we passing it in at all?

It's place-holder for device to be mounted, for overlayfs this can be
any string but cannot be omitted. I probably should use $SCRATCH_DEV
instead, like what _scratch_mount does on overlayfs, so helpers like
_fs_type and _df_device that look for mounted device could work
correctly.

Thanks for the review!

Eryu

  reply	other threads:[~2016-09-01  3:56 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 [this message]
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

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=20160901035622.GZ27776@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.