ovl: file descriptors based layer setup
Get series with b4
b4 am [email protected] change-id 20241011-work-overlayfs-dbcfa9223e87Versions newest first
- v3 Latest5 patches 3 repliesIn review
- v2 RFC4 patches 9 repliesSuperseded
- v1 RFC3 patches 2 repliesSuperseded
Changes in v3 from the cover letter
- Add documentation into overlayfs.rst.
- Rename new mount api parsing helper.
- Change cleanup scope in helper.
- Link to v2: https://lore.kernel.org/r/[email protected]
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | fs: add helper to use mount option as path or fdfs/ include/ | +24 | 0 replies | |
| 2/5 | ovl: specify layers via file descriptorsfs/ | +91 | 2 replies | |
| 3/5 | Documentation,ovl: document new file descriptor based layersDocumentation/ | +17 | 0 replies | |
| 4/5 | selftests: use shared headertools/ tools/ | +44 | 0 replies | |
| 5/5 | selftests: add overlayfs fd mounting selfteststools/ tools/ tools/ +1 more | +158 | 0 replies |
Reviews trailers per patch
None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Amir Goldstein |
|---|---|
| Series | R-b |
| 1/5 | |
| 2/5 | |
| 3/5 | |
| 4/5 | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/5] ovl: file descriptors based layer setup
Hey,
Currently overlayfs only allows specifying layers through path names. This is inconvenient for users such as systemd that want to assemble an overlayfs mount purely based on file descriptors.
When porting overlayfs to the new mount api I already mentioned this. This enables user to specify both:
fsconfig(fd_overlay, FSCONFIG_SET_FD, "upperdir+", NULL, fd_upper);
fsconfig(fd_overlay, FSCONFIG_SET_FD, "workdir+", NULL, fd_work);
fsconfig(fd_overlay, FSCONFIG_SET_FD, "lowerdir+", NULL, fd_lower1);
fsconfig(fd_overlay, FSCONFIG_SET_FD, "lowerdir+", NULL, fd_lower2);in addition to:
fsconfig(fd_overlay, FSCONFIG_SET_STRING, "upperdir+", "/upper", 0);
fsconfig(fd_overlay, FSCONFIG_SET_STRING, "workdir+", "/work", 0);
fsconfig(fd_overlay, FSCONFIG_SET_STRING, "lowerdir+", "/lower1", 0);
fsconfig(fd_overlay, FSCONFIG_SET_STRING, "lowerdir+", "/lower2", 0);The selftest contains an example for this.
---
Changes in v3:
- Add documentation into overlayfs.rst.
- Rename new mount api parsing helper.
- Change cleanup scope in helper.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Alias fd and path based mount options.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Christian Brauner (5):
fs: add helper to use mount option as path or fd
ovl: specify layers via file descriptors Documentation,ovl: document new file descriptor based layers
selftests: use shared header
selftests: add overlayfs fd mounting selftests
Documentation/filesystems/overlayfs.rst | 17 +++ fs/fs_parser.c | 20 +++ fs/overlayfs/params.c | 116 ++++++++++++---- include/linux/fs_parser.h | 5 +- .../selftests/filesystems/overlayfs/.gitignore | 1 + .../selftests/filesystems/overlayfs/Makefile | 2 +- .../selftests/filesystems/overlayfs/dev_in_maps.c | 27 +--- .../filesystems/overlayfs/set_layers_via_fds.c | 152 +++++++++++++++++++++ .../selftests/filesystems/overlayfs/wrappers.h | 47 +++++++ 9 files changed, 334 insertions(+), 53 deletions(-)
---
base-commit: 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
change-id: 20241011-work-overlayfs-dbcfa9223e87