Skip to content

Overlayfs lazy lookup of lowerdata

Amir Goldstein linux-unionfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 25 repliesIn review
  2. v15 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- Include the prep patch set
- Split remove lowerdata from add lowerdata_redirect patch
- Remove embedded ovl_entry stack optimization
- Add lazy lookup and comment in d_real_inode()
- Improve documentation of :: data-only layers syntax
- Added RVBs

[1] https://lore.kernel.org/linux-unionfs/[email protected]/
[2] https://lore.kernel.org/linux-unionfs/[email protected]/
[3] https://github.com/amir73il/linux/commits/ovl-lazy-lowerdata
[4] https://github.com/amir73il/xfstests/commits/ovl-lazy-lowerdata

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13ovl: update of dentry revalidate flags after copy upfs/overlayfs/copy_up.c fs/overlayfs/dir.c fs/overlayfs/export.c +4 more+30 -130 replies
2/13ovl: use OVL_E() and OVL_E_FLAGS() accessorsfs/overlayfs/export.c fs/overlayfs/namei.c fs/overlayfs/ovl_entry.h +2 more+21 -160 replies
3/13ovl: use ovl_numlower() and ovl_lowerstack() accessorsfs/overlayfs/export.c fs/overlayfs/namei.c fs/overlayfs/ovl_entry.h +2 more+72 -510 replies
4/13ovl: factor out ovl_free_entry() and ovl_stack_*() helpersfs/overlayfs/namei.c fs/overlayfs/overlayfs.h fs/overlayfs/ovl_entry.h +2 more+46 -220 replies
5/13ovl: move ovl_entry into ovl_inodefs/overlayfs/dir.c fs/overlayfs/export.c fs/overlayfs/inode.c +5 more+49 -560 replies
6/13ovl: deduplicate lowerpath and lowerstack[]fs/overlayfs/export.c fs/overlayfs/inode.c fs/overlayfs/namei.c +4 more+13 -210 replies
7/13ovl: deduplicate lowerdata and lowerstack[]fs/overlayfs/inode.c fs/overlayfs/namei.c fs/overlayfs/overlayfs.h +3 more+22 -170 replies
8/13ovl: remove unneeded goto instructionsfs/overlayfs/super.c+9 -120 replies
9/13ovl: introduce data-only lower layersDocumentation/filesystems/overlayfs.rst fs/overlayfs/namei.c fs/overlayfs/ovl_entry.h +1 more+85 -82 replies
10/13ovl: implement lookup in data-only layersfs/overlayfs/namei.c+72 -10 replies
11/13ovl: prepare to store lowerdata redirect for lazy lowerdata lookupfs/overlayfs/inode.c fs/overlayfs/namei.c fs/overlayfs/overlayfs.h +3 more+24 -40 replies
12/13ovl: prepare for lazy lookup of lowerdata inodefs/overlayfs/file.c fs/overlayfs/inode.c fs/overlayfs/super.c +1 more+33 -50 replies
13/13ovl: implement lazy lookup of lowerdata in data-only layersfs/overlayfs/copy_up.c fs/overlayfs/file.c fs/overlayfs/namei.c +4 more+107 -140 replies

Reviews trailers per patch

10 of 13 patches have a Reviewed-by or Acked-by.

PatchGao XiangAlexander Larsson
1/13R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13
7/13
8/13R-b
9/13R-b
10/13R-b
11/13
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] Overlayfs lazy lookup of lowerdata

Miklos,

This v2 combines the prep patch set [1] and lazy lookup patch set [2].

This work is motivated by Alexander's composefs use case. Alexander has been developing and testing his fsverity patches over my lazy-lowerdata-lookup branch [3].

Alexander has also written tests for lazy lowerdata lookup [4].

Note that patch #1 is a Fixes patch for stable.
Gao commented that the fix may not be complete, but I think it is better than no fix at all.

Regarding lazy lookup in d_real(), I am not sure if the best effort lookup is the best solution, but in any case, none of this code kicks in without explicit opt-in to data-only layers, so the risk of breaking existing setups is quite low.

Thanks,
Amir.

Changes since v1:
- Include the prep patch set
- Split remove lowerdata from add lowerdata_redirect patch
- Remove embedded ovl_entry stack optimization
- Add lazy lookup and comment in d_real_inode()
- Improve documentation of :: data-only layers syntax
- Added RVBs

[1] https://lore.kernel.org/linux-unionfs/[email protected]/
[2] https://lore.kernel.org/linux-unionfs/[email protected]/
[3] https://github.com/amir73il/linux/commits/ovl-lazy-lowerdata
[4] https://github.com/amir73il/xfstests/commits/ovl-lazy-lowerdata

Amir Goldstein (13):
ovl: update of dentry revalidate flags after copy up
ovl: use OVL_E() and OVL_E_FLAGS() accessors
ovl: use ovl_numlower() and ovl_lowerstack() accessors
ovl: factor out ovl_free_entry() and ovl_stack_*() helpers
ovl: move ovl_entry into ovl_inode
ovl: deduplicate lowerpath and lowerstack[]
ovl: deduplicate lowerdata and lowerstack[]
ovl: remove unneeded goto instructions
ovl: introduce data-only lower layers
ovl: implement lookup in data-only layers
ovl: prepare to store lowerdata redirect for lazy lowerdata lookup
ovl: prepare for lazy lookup of lowerdata inode
ovl: implement lazy lookup of lowerdata in data-only layers

 Documentation/filesystems/overlayfs.rst |  36 +++++
 fs/overlayfs/copy_up.c                  |  11 ++
 fs/overlayfs/dir.c                      |   3 +-
 fs/overlayfs/export.c                   |  41 +++---
 fs/overlayfs/file.c                     |  21 ++-
 fs/overlayfs/inode.c                    |  38 +++--
 fs/overlayfs/namei.c                    | 185 +++++++++++++++++++-----
 fs/overlayfs/overlayfs.h                |  20 ++-
 fs/overlayfs/ovl_entry.h                |  73 ++++++++--
 fs/overlayfs/super.c                    | 132 ++++++++++-------
 fs/overlayfs/util.c                     | 165 ++++++++++++++++-----
 11 files changed, 534 insertions(+), 191 deletions(-)
Signature · 1 line
2.34.1