linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v13 00/10] fuse: Add support for passthrough read/write
@ 2023-05-19 12:56 Amir Goldstein
  2023-05-19 12:56 ` [PATCH v13 01/10] fs: Generic function to convert iocb to rw flags Amir Goldstein
                   ` (11 more replies)
  0 siblings, 12 replies; 55+ messages in thread
From: Amir Goldstein @ 2023-05-19 12:56 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Daniel Rosenberg, Paul Lawrence, Alessio Balsini, fuse-devel,
	linux-fsdevel

Miklos,

This patch set addresses your review feedback on Alesio's V12 patch set
from 2021 [1] as well as other bugs that I have found since.
This patch set uses refcounted backing files as we discussed recently [2].

I am posting this for several possible outcomes:

1. Either FUSE-BPF develpers can use this as a reference implementation
   for their 1st phase of "backing file passthrough"
2. Or they can tell me which API changes need to made to this patch set
   so the API is flexible enough to extend to "backing inode passthrough"
   and to "BPF filters" later on
3. We find there is little overlap in the APIs and merge this as is

These patches are available on github [3] along with libfuse patches [4].
I tested them by running xfstests (./check -fuse -g quick.rw) with latest
libfuse xfstest support.

Without FOPEN_PASSTHROUGH, one test in this group fails (generic/451)
which tests mixed buffered/aio writes.
With FOPEN_PASSTHROUGH, this test also passes.

This revision does not set any limitations on the number of backing files
that can be mapped by the server.  I considered several ways to address
this and decided to try a different approach.

Patch 10 (with matching libfuse patch) is an RFC patch for an alternative
API approach. Please see my comments on that patch.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/20210125153057.3623715-1-balsini@android.com/
[2] https://lore.kernel.org/linux-fsdevel/CAJfpegvbMKadnsBZmEvZpCxeWaMEGDRiDBqEZqaBSXcWyPZnpA@mail.gmail.com/
[3] https://github.com/amir73il/linux/commits/fuse-passthrough-fd
[4] https://github.com/amir73il/libfuse/commits/fuse-passthrough-fd

Changes since v12:
- Rebase to v6.4-rc2
- Reword 'lower file' language to 'backing file'
- Add explicit FOPEN_PASSTHROUGH open flags
- Remove fuse_passthrough_out container
- Add FUSE_DEV_IOC_PASSTHROUGH_CLOSE ioctl
- Add experimental FUSE_DEV_IOC_PASSTHROUGH_SETUP ioctl
- Distinguished errors for failures to create passthrough id
  (EBADF, EOPNOTSUPP, ELOOP)
- idr and fuse_file point to refcounted passthrough object
- Use rcu_read_lock() to get passthrough object by id
- Handle errors to setup passthrough in atomic_open()
- Invalidate mtime/size after passthrough write
- Invalidate atime after passthrough read/mmap
- Bump FUSE protocol minor version
Alessio Balsini (2):
  fs: Generic function to convert iocb to rw flags
  fuse: Definitions and ioctl for passthrough

Amir Goldstein (8):
  fuse: Passthrough initialization and release
  fuse: Introduce synchronous read and write for passthrough
  fuse: Handle asynchronous read and write in passthrough
  fuse: Use daemon creds in passthrough mode
  fuse: Introduce passthrough for mmap
  fuse: update inode size/mtime after passthrough write
  fuse: invalidate atime after passthrough read/mmap
  fuse: setup a passthrough fd without a permanent backing id

 fs/fuse/Makefile          |   1 +
 fs/fuse/dev.c             |  76 ++++++++-
 fs/fuse/dir.c             |   7 +-
 fs/fuse/file.c            |  28 +++-
 fs/fuse/fuse_i.h          |  48 +++++-
 fs/fuse/inode.c           |  22 ++-
 fs/fuse/passthrough.c     | 344 ++++++++++++++++++++++++++++++++++++++
 fs/overlayfs/file.c       |  23 +--
 include/linux/fs.h        |   5 +
 include/uapi/linux/fuse.h |  21 ++-
 10 files changed, 535 insertions(+), 40 deletions(-)
 create mode 100644 fs/fuse/passthrough.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2023-10-16 19:16 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19 12:56 [PATCH v13 00/10] fuse: Add support for passthrough read/write Amir Goldstein
2023-05-19 12:56 ` [PATCH v13 01/10] fs: Generic function to convert iocb to rw flags Amir Goldstein
2023-05-19 12:56 ` [PATCH v13 02/10] fuse: Definitions and ioctl for passthrough Amir Goldstein
2023-05-19 15:12   ` Miklos Szeredi
2023-05-20 10:20     ` Amir Goldstein
2023-05-22 14:50       ` Miklos Szeredi
2023-05-24 10:00         ` Amir Goldstein
2023-05-19 12:56 ` [PATCH v13 03/10] fuse: Passthrough initialization and release Amir Goldstein
2023-05-19 12:56 ` [PATCH v13 04/10] fuse: Introduce synchronous read and write for passthrough Amir Goldstein
2023-05-19 12:57 ` [PATCH v13 05/10] fuse: Handle asynchronous read and write in passthrough Amir Goldstein
2023-05-22 15:20   ` Miklos Szeredi
2023-05-24 10:03     ` Amir Goldstein
2023-08-21 15:27       ` Amir Goldstein
2023-08-22 10:18         ` Amir Goldstein
2023-08-22 11:03           ` Miklos Szeredi
2023-08-22 13:22             ` Amir Goldstein
2023-08-22 14:06               ` Miklos Szeredi
2023-08-24 12:11             ` Amir Goldstein
2023-08-29 12:42               ` Miklos Szeredi
2023-05-19 12:57 ` [PATCH v13 06/10] fuse: Use daemon creds in passthrough mode Amir Goldstein
2023-05-19 12:57 ` [PATCH v13 07/10] fuse: Introduce passthrough for mmap Amir Goldstein
2023-05-19 12:57 ` [PATCH v13 08/10] fuse: update inode size/mtime after passthrough write Amir Goldstein
2023-09-25  6:41   ` [External] " Zhang Tianci
2023-09-25 10:43     ` Amir Goldstein
2023-09-26 15:31       ` Jens Axboe
2023-09-26 15:48         ` Amir Goldstein
2023-09-26 16:19           ` Jens Axboe
2023-09-26 16:56             ` Amir Goldstein
2023-05-19 12:57 ` [PATCH v13 09/10] fuse: invalidate atime after passthrough read/mmap Amir Goldstein
2023-05-19 12:57 ` [PATCH v13 10/10] fuse: setup a passthrough fd without a permanent backing id Amir Goldstein
2023-06-06 10:22   ` Fwd: " Miklos Szeredi
2023-06-06 11:00     ` [fuse-devel] " Amir Goldstein
2023-06-06 12:46       ` Miklos Szeredi
2023-05-20 10:28 ` [PATCH v13 00/10] fuse: Add support for passthrough read/write Amir Goldstein
2023-06-06  9:13 ` Amir Goldstein
2023-06-06  9:49   ` Miklos Szeredi
2023-06-06 11:19     ` Amir Goldstein
2023-06-06 13:06       ` Miklos Szeredi
2023-08-29 18:14         ` Amir Goldstein
2023-09-20 13:56           ` Amir Goldstein
2023-09-20 18:15             ` Miklos Szeredi
2023-09-21  7:33               ` Amir Goldstein
2023-09-21  8:21                 ` Miklos Szeredi
2023-09-21  9:17                   ` Amir Goldstein
2023-09-21  9:30                     ` Miklos Szeredi
2023-09-21 10:31                       ` Amir Goldstein
2023-09-21 11:50                         ` Miklos Szeredi
2023-09-22 12:45                           ` Amir Goldstein
2023-10-08 17:53                             ` Amir Goldstein
2023-10-10 14:31                               ` Miklos Szeredi
2023-10-10 15:14                                 ` Amir Goldstein
2023-10-14 16:01                                   ` Amir Goldstein
2023-10-16 10:30                                 ` Amir Goldstein
2023-10-16 13:21                                   ` Miklos Szeredi
2023-10-16 19:16                                   ` Bernd Schubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).