Implement overlayfs index=all mount option
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | ovl: fix EIO from lookup of non-indexed upperfs/ fs/ fs/ | +34 | 0 replies | |
| 2/11 | ovl: verify whiteout index entries on mountfs/ | +16 | 0 replies | |
| 3/11 | ovl: create ovl_need_index() helperfs/ fs/ fs/ | +23 | 0 replies | |
| 4/11 | ovl: add support for mount option index=allfs/ fs/ fs/ +1 more | +36 | 0 replies | |
| 5/11 | ovl: lookup index for directoriesfs/ | +39 | 0 replies | |
| 6/11 | ovl: verify directory index entries on mountfs/ fs/ fs/ | +45 | 1 reply | |
| 7/11 | ovl: index directories on copy upfs/ fs/ | +118 | 0 replies | |
| 8/11 | ovl: cleanup dir index when dir nlink drops to zerofs/ | +3 | 0 replies | |
| 9/11 | ovl: whiteout index when union nlink drops to zerofs/ fs/ fs/ | +50 | 0 replies | |
| 10/11 | ovl: whiteout orphan index entries on mountfs/ fs/ fs/ +1 more | +63 | 0 replies | |
| 11/11 | ovl: cleanup stale whiteout index entries on mountfs/ | +97 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] Implement overlayfs index=all mount option
Miklos,
This is the second of two prep patch sets [1][2] for NFS export [3]. NFS export is enabled with the 'verify_dir' and 'index=all' mount options.
The requirement for 'index=all' can be relaxed if we create index for redirected dirs on lookup and for renamed non-dirs when encoding file handles. Decoding file handle will be more complex without index=all, so per your suggestion, this was not implemented for first version of NFS export.
The first two patches in this series are tagged for stable v4.13. The first patch I already posted, relaxes some index lookup constrains that we can do without.
The second patch allows kernel v4.13 to mount an overlay with whiteout index entries, which are being introduced by this patch set.
To sanity test index=all, I have implemented _overlay_check_fs() helper for xfstests [4], which is a very basic "fsck" of the index dir. This helper is called at the end of each overlay xfstest to verify the sanity of the index entries.
Amir.
[1] https://github.com/amir73il/linux/commits/ovl-verify-dir
[2] https://github.com/amir73il/linux/commits/ovl-index-all
[3] https://github.com/amir73il/linux/commits/ovl-nfs-export
[4] https://github.com/amir73il/xfstests/commits/ovl-index-all
Amir Goldstein (11):
ovl: fix EIO from lookup of non-indexed upper
ovl: verify whiteout index entries on mount
ovl: create ovl_need_index() helper
ovl: add support for mount option index=all
ovl: lookup index for directories
ovl: verify directory index entries on mount
ovl: index directories on copy up
ovl: cleanup dir index when dir nlink drops to zero
ovl: whiteout index when union nlink drops to zero
ovl: whiteout orphan index entries on mount
ovl: cleanup stale whiteout index entries on mount
fs/overlayfs/copy_up.c | 130 +++++++++++++++++--- fs/overlayfs/dir.c | 58 +++++---- fs/overlayfs/inode.c | 20 ++- fs/overlayfs/namei.c | 314 +++++++++++++++++++++++++++++++++-------------- fs/overlayfs/overlayfs.h | 29 ++++- fs/overlayfs/ovl_entry.h | 2 +- fs/overlayfs/readdir.c | 48 ++++++-- fs/overlayfs/super.c | 28 +++-- fs/overlayfs/util.c | 55 ++++++--- 9 files changed, 505 insertions(+), 179 deletions(-)
Signature · 1 line
2.7.4