Re: [PATCH] ovl: factor out some common helpers for backing files io

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 12, 2023 at 09:54:08PM +0300, Amir Goldstein wrote:
> Overlayfs stores its files data in backing files on other filesystems.
> 
> Factor out some common helpers to perform io to backing files, that will
> later be reused by fuse passthrough code.
> 
> Suggested-by: Miklos Szeredi <miklos@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/CAJfpeguhmZbjP3JLqtUy0AdWaHOkAPWeP827BBWwRFEAUgnUcQ@xxxxxxxxxxxxxx
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> ---
> 
> Miklos,
> 
> This is the re-factoring that you suggested in the FUSE passthrough
> patches discussion linked above.
> 
> This patch is based on the overlayfs prep patch set I just posted [1].
> 
> Although overlayfs currently is the only user of these backing file
> helpers, I am sending this patch to a wider audience in case other
> filesystem developers want to comment on the abstraction.
> 
> We could perhaps later considering moving backing_file_open() helper
> and related code to backing_file.c.
> 
> In any case, if there are no objections, I plan to queue this work
> for 6.7 via the overlayfs tree.
> 
> Thanks,
> Amir.
> 
> [1] https://lore.kernel.org/linux-unionfs/20230912173653.3317828-1-amir73il@xxxxxxxxx/
> 
> 
>  MAINTAINERS                  |   2 +
>  fs/Kconfig                   |   4 +
>  fs/Makefile                  |   1 +
>  fs/backing_file.c            | 160 +++++++++++++++++++++++++++++++++++
>  fs/overlayfs/Kconfig         |   1 +
>  fs/overlayfs/file.c          | 137 ++----------------------------
>  fs/overlayfs/overlayfs.h     |   2 -
>  fs/overlayfs/super.c         |  11 +--
>  include/linux/backing_file.h |  22 +++++
>  9 files changed, 199 insertions(+), 141 deletions(-)
>  create mode 100644 fs/backing_file.c
>  create mode 100644 include/linux/backing_file.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 90f13281d297..4e1d21773e0e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16092,7 +16092,9 @@ L:	linux-unionfs@xxxxxxxxxxxxxxx
>  S:	Supported
>  T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git
>  F:	Documentation/filesystems/overlayfs.rst
> +F:	fs/backing_file.c
>  F:	fs/overlayfs/
> +F:	include/linux/backing_file.h

I'd like to do this slightly differently, please. All vfs infra goes
through vfs trees but for new infra like this where someone steps up to
be a maintainer we add a new section (like bpf or networking does):

VFS [BACKING FILE]
M:      Miklos Szeredi <miklos@xxxxxxxxxx>
M:      Amir Goldstein <amir73il@xxxxxxxxx>
F:      fs/backing_file.c
F:      include/linux/backing_file.h
L:	linux-fsdevel@xxxxxxxxxxxxxxx
S:	Maintained



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux