All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Overlayfs file handle decode optimization
@ 2018-03-11 11:22 Amir Goldstein
  2018-03-11 11:22 ` [PATCH v2 1/3] ovl: disambiguate ovl_encode_fh() Amir Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Amir Goldstein @ 2018-03-11 11:22 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: linux-unionfs

Miklos,

This is the 2nd revision of patch set to optimize file handle decode.
It is available on branch ovl-nfs-export on my github [1].

Patch 2 introduces a semantic change to exportfs_decode_fh() to allow
callers to opt-out of reconnecting the dentry. I like this minimal
semantic chance, but if you think I should factor-out a "_noreconnect"
variant of exportfs_decode_fh(), I can do that. Also, in
ovl_lower_fh_to_d(), if we get a disconnected directory dentry and we
end up needing a connected dentry, we drop the reference to the
disconnected dentry and call exportfs_decode_fh() again without
opting-out of reconnect. I could also export exportfs_reconnect_path()
for that case, but seems unnecessary to do that as the disconnected
dentry will likely still be in cache anyway.

To verify optimization, I ran all the overlay/exportfs tests with trace
prints in index lookup and reconnect functions to verify that reconnect
is not called when decoding a lower dir file handle of a deleted dir.
Detailed analysis on this test results are in commit message of the last
patch.

Thanks,
Amir.

Changes since v1:
- Discard hash inodes by file handle
- Lookup in inode cache before lookup in index dir
- Lookup underlying fs inode cache without reconnect lower dir

[1] https://github.com/amir73il/linux/commits/ovl-nfs-export

Amir Goldstein (3):
  ovl: disambiguate ovl_encode_fh()
  ovl: do not try to reconnect a disconnected origin dentry
  ovl: lookup in inode cache first when decoding lower file handle

 fs/exportfs/expfs.c      |  9 +++++++
 fs/overlayfs/copy_up.c   |  6 ++---
 fs/overlayfs/export.c    | 70 +++++++++++++++++++++++++++---------------------
 fs/overlayfs/namei.c     | 20 +++++++-------
 fs/overlayfs/overlayfs.h |  7 ++---
 5 files changed, 66 insertions(+), 46 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-22 15:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-11 11:22 [PATCH v2 0/3] Overlayfs file handle decode optimization Amir Goldstein
2018-03-11 11:22 ` [PATCH v2 1/3] ovl: disambiguate ovl_encode_fh() Amir Goldstein
2018-03-11 11:22 ` [PATCH v2 2/3] ovl: do not try to reconnect a disconnected origin dentry Amir Goldstein
2018-03-11 11:22 ` [PATCH v2 3/3] ovl: lookup in inode cache first when decoding lower file handle Amir Goldstein
2018-03-22 10:41   ` Miklos Szeredi
2018-03-22 11:55     ` Amir Goldstein
2018-03-22 15:20       ` Amir Goldstein
2018-03-22 15:34         ` Miklos Szeredi

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.