Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532267
| From | Amir Goldstein <amir73il@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [POC/RFC PATCH] overlayfs: constant inode numbers |
| Date | 2016-11-29 14:10 +0100 |
| Message-ID | <sIQky-rW-29@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <sIqgp-c4-15@gated-at.bofh.it> <sIrvQ-Vu-27@gated-at.bofh.it> <sIsLg-1AV-11@gated-at.bofh.it> <sING2-7bs-37@gated-at.bofh.it> <sIOVs-7QX-59@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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: >> >> [...] >> >> >>> Well, not sure if you noticed my redirect_fh (rediect by file handle) work. >>> If differs from redirect by path in 2 major ways: >>> 1. Like OVL_XATTR_INO, redirect is set on copy up (but only for dirs) >>> 2. Lookup is much simpler (and most likely faster) then full path lookup >>> >>> It would be trivial to set oe->ino of merged dir from lower most entry in >>> ovl_lookup(). >> >> Okay. In fact always using the handle looks like a better option >> overall. File handle should be unique for the lifetime of the >> filesystem, while inode numbers may be reused. >> >> Biggest drawback of the file handle based redirects is exactly that: >> makes backing up the overlay basically impossible, since file handles >> won't work after a backup + restore. But as an optimization, in >> addition to path based redirects it would work fine and provide a good >> way to get the stable ino. >> > > 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? > 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 This is a good way to avoid stale OVL_XATTR_INO after backup+restore. Amir.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[POC/RFC PATCH] overlayfs: constant inode numbers Miklos Szeredi <miklos@szeredi.hu> - 2016-11-25 22:40 +0100
Fwd: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-11-28 10:20 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Miklos Szeredi <miklos@szeredi.hu> - 2016-11-28 11:40 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-11-28 13:00 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-11-28 19:10 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Miklos Szeredi <miklos@szeredi.hu> - 2016-11-29 11:20 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-11-29 12:40 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-11-29 14:10 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Miklos Szeredi <miklos@szeredi.hu> - 2016-11-29 23:00 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-11-30 16:10 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-11-30 17:40 +0100
Re: [POC/RFC PATCH] overlayfs: constant inode numbers Amir Goldstein <amir73il@gmail.com> - 2016-12-05 15:10 +0100
csiph-web