linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: "linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [POC/RFC PATCH] overlayfs: constant inode numbers
Date: Tue, 29 Nov 2016 22:49:51 +0100	[thread overview]
Message-ID: <CAJfpegtRNQAebLbz2F2zV8asqt31m7Lrgc+ya28UZU1e8E1oEw@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxj2yMwY_eCdc0+6U0QP1ckm5aPw5x6xtMz+WdHvJ4bFTg@mail.gmail.com>

On Tue, Nov 29, 2016 at 1:03 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> On Tue, Nov 29, 2016 at 1:34 PM, Amir Goldstein <amir73il@gmail.com> wrote:
>> On Tue, Nov 29, 2016 at 12:16 PM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>>> On Mon, Nov 28, 2016 at 12:56 PM, Amir Goldstein <amir73il@gmail.com> wrote:

>> Not sure that I understand what you are suggesting, but I would be happy
>> to make the needed adjustments to redirect_fh per your request if you clarify
>> what you mean. From what I understand:
>>
>> 1. If redirect_dir=fh (and supported by layers), store lower handle
>>     on dir copy up in new xattr OVL_XATTR_FH
>> 2. In ovl_rename(), set OVL_XATTR_REDIRECT regardless of OVL_XATTR_FH
>> 3. In ovl_lookup_single(), carry both d.redirct and d.redirect_fh to next layer
>> 4. In ovl_lookup_layer(), lookup by handle first then by path
>>
>> Mind you that unlike OVL_XATTR_INO, OVL_XATTR_FH points to *next* inode
>> rather then *lowest* inode, so it does not really improve anything wrt
>> getting the
>> stable inode. Stable inode of merged dir is available after lookup in
>> oe->lowerstack[oe->numlower - 1].dentry->d_inode->i_ino
>> regardless of whether lookup was by handle or by path or no redirect at all, so
>> not sure what you meant by "... and provide a good way to get the stable ino."
>> Either I managed to confuse you, or I am missing something?

I meant that we can unify OVL_XATTR_INO  with "redirect/fh"
functionality and get something good out of it.

> Perhaps you meant for non-dir:
>
> 5. If redirect_dir=fh, *propagate* lowest-handle on non-dir copy up
> 6. In ovl_lookup() of non-dir, decode lowest-handle to set oe->ino

Yes.

OVL_XATTR_FH would be safe to ignore, so this is back and forward
compatible..  And the cost is probably not prohitive, since copy ups
should be relatively rare.

After a backup + restore it is not expected that we get back the old
inode numbers so it's fine to ignore the stale file handles.

The following issues are left:

 - performance of readdir;
 - what to do if not all layers are on the same fs;
 - hard link copy ups.

Thanks,
Miklos

  reply	other threads:[~2016-11-29 21:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 21:29 [POC/RFC PATCH] overlayfs: constant inode numbers Miklos Szeredi
     [not found] ` <CAOQ4uxgSvo_v37aLJb8FK3c5sDqCkN2XWOd783UXaomdVAvsEQ@mail.gmail.com>
     [not found]   ` <CAOQ4uxi2Ko-G2nA_bSWT8juuss9aS9ZfiBWS95RrdfBy30Tozg@mail.gmail.com>
2016-11-28  9:10     ` Fwd: " Amir Goldstein
2016-11-28 10:35       ` Miklos Szeredi
2016-11-28 11:56         ` Amir Goldstein
2016-11-28 18:02           ` Amir Goldstein
2016-11-29 10:16           ` Miklos Szeredi
2016-11-29 11:34             ` Amir Goldstein
2016-11-29 12:03               ` Amir Goldstein
2016-11-29 21:49                 ` Miklos Szeredi [this message]
2016-11-30 15:05                   ` Amir Goldstein
2016-11-30 16:36                     ` Amir Goldstein
2016-12-05 14: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=CAJfpegtRNQAebLbz2F2zV8asqt31m7Lrgc+ya28UZU1e8E1oEw@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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 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).