public inbox for linux-unionfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v9 04/15] ovl: Create origin xattr on copy up for all files
Date: Mon, 8 Jan 2018 10:58:28 -0500	[thread overview]
Message-ID: <20180108155828.GA13708@redhat.com> (raw)
In-Reply-To: <CAOQ4uxg1K_EA+kYzMB8LMP4B-VLxStRT3yworjMJhHWAHNTxWg@mail.gmail.com>

On Mon, Jan 08, 2018 at 01:18:05PM +0200, Amir Goldstein wrote:
> On Mon, Jan 8, 2018 at 12:16 PM, Miklos Szeredi <miklos@szeredi.hu> wrote:
> > On Wed, Nov 29, 2017 at 4:54 PM, Vivek Goyal <vgoyal@redhat.com> wrote:
> >> Right now my understanding is that origin xattr is created for all copied
> >> up files if index=on. And if index=off, then we create it for all type
> >> of files except hardlinks (nlink != 1).
> >>
> >> With metadata only copy up, I will still require origin xattr to copy up
> >> data later, so create it even for hardlinks even with index=off.
> >
> > This doesn't look right.  Without index we can't do hard links
> > properly, doing metacopy in that case will complicate the situation
> > further and can result in weirdness (e.g. two files that have
> > different attributes but same inode number).
> 
> But ovl_getattr() does not return lower st_ino for non-indexed
> upper with lowerstat.nlink != 1.

Hi Miklos,

Thanks Amir for ovl_gettr() behavior.

So there are 3 ways to deal with this.

A. Keep ORIGIN but do not report lower inode number if index=off, instead
   report upper inode number.

B. Do not create ORIGIN to begin with if index=off and disable metacopy
   for hardlinked files.

C. Make metacopy dependent on index=on.

currently I take approach A. That is always create ORIGIN xattr but
do not use it when we think this might be a problem. (Like for the
cases of broken hardlinks).

If you still don't like this approach, please let me know and I will
change it. And switch to say approach B?

Thanks
Vivek

> 
> >
> > So I think we should either require index for metacopy, or disable
> > metacopy only for nlink != 1 files, but otherwise enable it even in
> > case of index=off.
> >
> 
> IIRC, commit 6eaf011144af ("ovl: fix EIO from lookup of non-indexed
> upper") was a result of a conversation about this very patch and this
> very issue. After this commit, the situation of non-indexed upper with
> origin is handled correctly on lookup (hash by upper inode) and I
> couldn't find a reason why setting origin for metacopy with index=off
> is wrong. Or anything that could go wrong for setting origin on every
> copy up.
> 
> Am I missing something?
> 
> Amir.

  reply	other threads:[~2018-01-08 15:58 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 15:54 [PATCH v9 00/15] overlayfs: Delayed copy up of data Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 01/15] ovl: Do not look for OVL_XATTR_NLINK if index is not there Vivek Goyal
2017-11-29 17:04   ` Amir Goldstein
2017-11-29 15:54 ` [PATCH v9 02/15] ovl: disable redirect_dir and index when no xattr support Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 03/15] ovl: ovl_check_setxattr() get rid of redundant -EOPNOTSUPP check Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 04/15] ovl: Create origin xattr on copy up for all files Vivek Goyal
2018-01-08 10:16   ` Miklos Szeredi
2018-01-08 11:18     ` Amir Goldstein
2018-01-08 15:58       ` Vivek Goyal [this message]
2017-11-29 15:54 ` [PATCH v9 05/15] ovl: Provide a mount option metacopy=on/off for metadata copyup Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 06/15] ovl: During copy up, first copy up metadata and then data Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 07/15] ovl: Move the copy up helpers to copy_up.c Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 08/15] ovl: Copy up only metadata during copy up where it makes sense Vivek Goyal
2018-01-08 10:35   ` Miklos Szeredi
2018-01-08 17:03     ` Vivek Goyal
2018-01-09 10:49       ` Miklos Szeredi
2018-01-09 13:26         ` Vivek Goyal
2018-01-09 13:33           ` Amir Goldstein
2018-01-09 20:34             ` Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 09/15] ovl: Add helper ovl_already_copied_up() Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 10/15] ovl: A new xattr OVL_XATTR_METACOPY for file on upper Vivek Goyal
2018-01-08 15:50   ` Miklos Szeredi
2018-01-08 16:17     ` Vivek Goyal
2018-01-08 16:21       ` Miklos Szeredi
2018-01-08 16:25         ` Miklos Szeredi
2017-11-29 15:54 ` [PATCH v9 11/15] ovl: Fix ovl_getattr() to get number of blocks from lower Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 12/15] ovl: Set OVL_UPPERDATA flag during ovl_lookup() Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 13/15] ovl: Do not expose metacopy only upper dentry from d_real() Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 14/15] ovl: Fix encryption/compression status of a metacopy only file Vivek Goyal
2018-01-18 14:24   ` Vivek Goyal
2018-01-18 14:32     ` Amir Goldstein
2018-01-18 14:36       ` Vivek Goyal
2017-11-29 15:54 ` [PATCH v9 15/15] ovl: Enable metadata only feature Vivek Goyal
2018-01-06  7:38 ` [PATCH v9 00/15] overlayfs: Delayed copy up of data Amir Goldstein
2018-01-08 14:13   ` Vivek Goyal
2018-01-08 14:42     ` Amir Goldstein
2018-01-08 15:44       ` Vivek Goyal
2018-01-10 14:56       ` Vivek Goyal
2018-01-10 15:08         ` Miklos Szeredi
2018-01-10 15:23           ` Vivek Goyal
2018-01-10 15:10         ` Amir Goldstein
2018-01-10 15:27           ` Vivek Goyal
2018-01-10 15:38             ` Miklos Szeredi
2018-01-10 15:47               ` Vivek Goyal
2018-01-10 15:54                 ` Amir Goldstein
2018-01-10 16:03                   ` Miklos Szeredi
2018-01-10 16:30                     ` Vivek Goyal
2018-01-10 17:05                       ` Amir Goldstein

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=20180108155828.GA13708@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.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