Skip to content

Implement overlayfs verify_dir mount option

Amir Goldstein linux-unionfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ovl: fix rmdir problem on origin dirfs/overlayfs/dir.c fs/overlayfs/namei.c fs/overlayfs/overlayfs.h +2 more+57 -171 reply
2/7ovl: no direct iteration for dir with copy up originfs/overlayfs/readdir.c+25 -41 reply
3/7ovl: remove unneeded arg from ovl_verify_origin()fs/overlayfs/namei.c fs/overlayfs/overlayfs.h fs/overlayfs/super.c+8 -80 replies
4/7ovl: disable redirect_dir and index when no xattr supportfs/overlayfs/super.c+3 -10 replies
5/7ovl: ignore redirect_dir and index when no upper layerfs/overlayfs/super.c+19 -90 replies
6/7ovl: add support for verify_dir mount optionDocumentation/filesystems/overlayfs.txt fs/overlayfs/namei.c fs/overlayfs/overlayfs.h +3 more+65 -140 replies
7/7ovl: follow decoded origin file handle of merge dirDocumentation/filesystems/overlayfs.txt fs/dcache.c fs/overlayfs/namei.c+40 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] Implement overlayfs verify_dir mount option

Miklos,

This is the first 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 'verify_dir' can be relaxed if we attach generation numbers to index entries as you suggested, but this was not implemented for first version of NFS export.

The first two patches in this series, one from zhangyi and one from me are not directly related to 'verify_dir', but they make sense in this context, because 'verify_dir' may refuse to follow to lower dir and leave a pure upper dir with ORIGIN and whiteouts.
These two patches have been around for a while and already have a merged xfstest to verify them (overlay/031).

The last two patches add the actual verification of lower dir. They have been on my development branch for a few cycles already and the feature is being exercised with snapshots test.

[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

Amir Goldstein (7):
ovl: fix rmdir problem on origin dir
ovl: no direct iteration for dir with copy up origin
ovl: remove unneeded arg from ovl_verify_origin()
ovl: disable redirect_dir and index when no xattr support
ovl: ignore redirect_dir and index when no upper layer
ovl: add support for verify_dir mount option
ovl: follow decoded origin file handle of merge dir

 Documentation/filesystems/overlayfs.txt | 20 ++++++++++
 fs/dcache.c                             |  1 +
 fs/overlayfs/dir.c                      | 21 +++++++---
 fs/overlayfs/namei.c                    | 60 +++++++++++++++++++++++++----
 fs/overlayfs/overlayfs.h                |  8 ++--
 fs/overlayfs/ovl_entry.h                |  1 +
 fs/overlayfs/readdir.c                  | 59 ++++++++++++++++++++++------
 fs/overlayfs/super.c                    | 68 +++++++++++++++++++++++----------
 fs/overlayfs/util.c                     | 20 ++++++++++
 9 files changed, 209 insertions(+), 49 deletions(-)
Signature · 1 line
2.7.4