[PATCH 0/2] erofs: fd-based source and backing file introspection
From: Giuseppe Scrivano <hidden>
Date: 2026-07-08 09:34:55
Also in:
linux-fsdevel
From: Giuseppe Scrivano <hidden>
Date: 2026-07-08 09:34:55
Also in:
linux-fsdevel
This series adds two features to erofs for file-backed mounts: 1. Accept a source file descriptor via fsconfig(FSCONFIG_SET_FD, "source", NULL, fd) as an alternative to a path string. This is useful when the backing file isn't reachable by path in the caller's mount namespace. For example, composefs reusing an already-mounted erofs image's backing file. 2. Add an EROFS_IOC_GET_SOURCE_FD ioctl that returns a file descriptor to the backing image file. This allows userspace to retrieve the backing file from an existing erofs mount without needing to know or parse the original source path. Giuseppe Scrivano (2): erofs: accept source file descriptor via fsconfig erofs: add ioctl to retrieve the backing source file descriptor fs/erofs/inode.c | 25 +++++++++++++++++++++++++ fs/erofs/super.c | 36 +++++++++++++++++++++++++----------- include/uapi/linux/erofs.h | 9 +++++++++ 3 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 include/uapi/linux/erofs.h -- 2.55.0