Overlayfs file handle decode optimization
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 4 repliesIn review
- v14 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- 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
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ovl: disambiguate ovl_encode_fh()fs/ fs/ fs/ +1 more | +16 | 0 replies | |
| 2/3 | ovl: do not try to reconnect a disconnected origin dentryfs/ fs/ fs/ +1 more | +23 | 0 replies | |
| 3/3 | ovl: lookup in inode cache first when decoding lower file handlefs/ | +33 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] Overlayfs file handle decode optimization
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(-)
Signature · 1 line
2.7.4