From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 3/9] ovl: Provide a mount option metacopy=on/off for metadata copyup
Date: Wed, 11 Oct 2017 12:53:48 -0400 [thread overview]
Message-ID: <20171011165348.GC8086@redhat.com> (raw)
In-Reply-To: <CAOQ4uxg1OwbFuytiHLn3fwXzu3mZ8cwW6Vadj3YgTihbiL0BdA@mail.gmail.com>
On Wed, Oct 11, 2017 at 07:29:38PM +0300, Amir Goldstein wrote:
[..]
> >
> > Anyway, I did not understand what's the problem with borken upper
> > hardlinks when index=off. If two upper hardlinks (broken), can
> > point to same ORIGIN on lower, they will just copy up same data.
> >
> > IOW, it does not seem to be more broken then what it is now just
> > becase of metadata copy up or because of both upper pointing to
> > same ORIGIN? What am I missing.
> >
> It is not broken now because we intentionally do NOT set origin when
> copying up lower hardlinks and index is disabled.
> You must not break this rule, so instead you can avoid metacopy for
> lower hardlinks when index is disabled.
Hi Amir,
Ok, I am open to change it so that if index=off, lower hardlinks are not
copied up metadata only.
But please help me understand that what *additional* thing breaks if origin
is set when index=off.
Say lower has a file foo.txt and another hard link foo-link.txt.
(say index=off, metacopy=off).
Say, I open foo-link.txt for WRITE, and it gets copied up. Now there is
no link between foo-link.txt and foo.txt and if a user opens foo.txt for
READ, it does not see updates to foo-link.txt. So this is the broken
behavior of hardlinks with index=off, as of today.
Now I go back to original state and this time do same operation with
(indxex=off, metacopy=on). Then "chown foo-link.txt" will only copy
metadata and set origin to lower file. Say I also chown "foo.txt", that
will do the same thing. Now both foo.txt and foo-link.txt will have
ORIGIN pointing to same lower inode. If any of the file is opened for
WRITE, data will be copied up from same origin.
So setting same ORIGIN on two upper files, does not seem to break anything
additional, AFAICS. What am I missing.
Vivek
next prev parent reply other threads:[~2017-10-11 16:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 15:32 [RFC PATCH 0/9][V3] overlayfs: Delayed copy up of data Vivek Goyal
2017-10-10 15:32 ` [PATCH 1/9] ovl: ovl_check_setxattr() get rid of redundant -EOPNOTSUPP check Vivek Goyal
2017-10-10 15:32 ` [PATCH 2/9] ovl: During copy up, first copy up metadata and then data Vivek Goyal
2017-10-10 15:32 ` [PATCH 3/9] ovl: Provide a mount option metacopy=on/off for metadata copyup Vivek Goyal
2017-10-11 1:36 ` Amir Goldstein
2017-10-11 13:57 ` Vivek Goyal
2017-10-11 16:29 ` Amir Goldstein
2017-10-11 16:53 ` Vivek Goyal [this message]
2017-10-11 17:36 ` Amir Goldstein
2017-10-11 18:34 ` Vivek Goyal
2017-10-11 20:29 ` Amir Goldstein
2017-10-12 13:23 ` Vivek Goyal
2017-10-12 13:39 ` Amir Goldstein
2017-10-10 15:32 ` [PATCH 4/9] ovl: Copy up only metadata during copy up where it makes sense Vivek Goyal
2017-10-10 15:32 ` [PATCH 5/9] ovl: Set xattr OVL_XATTR_METACOPY on upper file Vivek Goyal
2017-10-10 17:03 ` Amir Goldstein
2017-10-11 20:16 ` Vivek Goyal
2017-10-11 20:44 ` Amir Goldstein
2017-10-10 15:32 ` [PATCH 6/9] ovl: Fix ovl_getattr() to get number of blocks from lower Vivek Goyal
2017-10-10 15:32 ` [PATCH 7/9] ovl: Introduce read/write barriers around metacopy flag update Vivek Goyal
2017-10-10 17:12 ` Amir Goldstein
2017-10-11 20:27 ` Vivek Goyal
2017-10-11 21:08 ` Amir Goldstein
2017-10-13 18:27 ` Vivek Goyal
2017-10-14 6:05 ` Amir Goldstein
2017-10-14 7:00 ` Amir Goldstein
2017-10-16 13:24 ` Vivek Goyal
2017-10-16 13:24 ` Vivek Goyal
2017-10-16 13:31 ` Amir Goldstein
2017-10-10 15:32 ` [PATCH 8/9] ovl: Set OVL_METACOPY flag during ovl_lookup() Vivek Goyal
2017-10-10 15:32 ` [PATCH 9/9] ovl: Return lower dentry if only metadata copy up took place Vivek Goyal
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=20171011165348.GC8086@redhat.com \
--to=vgoyal@redhat.com \
--cc=amir73il@gmail.com \
--cc=ebiederm@xmission.com \
--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).