All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Bernd Schubert <bernd.schubert@fastmail.fm>,
	Daniel Rosenberg <drosen@google.com>,
	 Paul Lawrence <paullawrence@google.com>,
	Alessio Balsini <balsini@android.com>,
	 Christian Brauner <brauner@kernel.org>,
	fuse-devel@lists.sourceforge.net,  linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v14 00/12] FUSE passthrough for file io
Date: Thu, 19 Oct 2023 17:33:44 +0300	[thread overview]
Message-ID: <CAOQ4uxh=cLySge6htd+DnJrqAKF=C_oJYfVrbpvQGik0wR-+iw@mail.gmail.com> (raw)
In-Reply-To: <20231016160902.2316986-1-amir73il@gmail.com>

On Mon, Oct 16, 2023 at 7:09 PM Amir Goldstein <amir73il@gmail.com> wrote:
>
> Miklos,
>
> I've shared several POC branches since the posting of v13 back in May
> and played with several API choices. It is time to post v14.
>
> The API we converged to is server managed shared backing files that are
> referenced by backing id plus per-file re-opened backing_file.
>
> This model looks coherent to me. I think that the example server [3]
> demonstrates that this API is simple enough to work with.
>
> There is quite a bit of re-factored code in this version - I've actually
> declared this common code as a new vfs subsystem [stackable filesystems]
> in MAINTAINERS per Christian's request.
>
> The re-factored common code is based on overlayfs-next and Christian's
> vfs.misc branch (for the backing_file changes).
>
> I am not posting performance numbers again. Alessio has already posted
> performance numbers back in v12 and nothing has changed in this regard.
> We are using a variant of v12 patches in production and the performance
> improvement is very noticable.
>
> Bernd and Nikolaus have helped with improving running fstests on fuse
> passthrough examples.
>
> I have ran the -g auto fstests with v14 patches with the example server.
> Compared to the baseline test results with passthrough_hp, the backing
> file passthrough passes several more test, mainly tests related to data
> coherency, such as generic/451.

FWIW, baseline passthrough_hp --nocache does pass generic/451.
Not surprising considering that the test is for
"Test data integrity when mixing buffered reads and asynchronous
 direct writes a file."

>
> The following tests are the only ones that pass on baseline passthtough_hp
> and fail with my backing file passthrough example:
>
>   generic/080 generic/120 generic/193 generic/215 generic/355
>
> Those tests are failing because of missing mtime/atime/ctime updates

Some more detailed analysis:

generic/120 tests -o noatime and fails because atime is
updated (on the backing file).
This is a general FUSE issue and passthrough_hp --nocache fails
the same test (i.e. it only passed because of attribute cache).

generic/080, generic/215 both test for c/mtime updates after mapped writes.
It is not surprising that backing file passthrough fails these tests -
there is no "passthrough getattr" like overlayfs and there is no opportunity
to invalidate the FUSE inode attribute cache.

> in some use cases and failure to strip suid/sgid bits in some cases.

The suid/sgid strip failures (generic/193, generic/355) were just a silly bug.
Forgot to add file_remove_privs() in passthrough write.
I now moved it from overlayfs into the common backing_file helpers.

I don't think that the issue with mapped writes c/mtime update is a
show stopper?

Thanks,
Amir.

>
> Changes from v13 [1]:
> - rebase on 6.6-rc6 (and overlayfs and vfs next branches)
> - server managed shared backing files without auto-close mode
> - open a backing_file per fuse_file with fuse file's path and flags
> - factor out common read/write/splice/mmap helpers from overlayfs
> - factor out ioctl helpers
>
> [1] https://lore.kernel.org/r/20230519125705.598234-1-amir73il@gmail.com/
> [2] https://github.com/amir73il/linux/commits/fuse-backing-fd-v14
> [3] https://github.com/amir73il/libfuse/commits/fuse-backing-fd
>
> Amir Goldstein (12):
>   fs: prepare for stackable filesystems backing file helpers
>   fs: factor out backing_file_{read,write}_iter() helpers
>   fs: factor out backing_file_splice_{read,write}() helpers
>   fs: factor out backing_file_mmap() helper
>   fuse: factor out helper for FUSE_DEV_IOC_CLONE
>   fuse: introduce FUSE_PASSTHROUGH capability
>   fuse: pass optional backing_id in struct fuse_open_out
>   fuse: implement ioctls to manage backing files
>   fuse: implement read/write passthrough
>   fuse: implement splice_{read/write} passthrough
>   fuse: implement passthrough for mmap
>   fuse: implement passthrough for readdir
>
>  MAINTAINERS                  |   9 +
>  fs/Kconfig                   |   4 +
>  fs/Makefile                  |   1 +
>  fs/backing-file.c            | 319 ++++++++++++++++++++++++++++
>  fs/fuse/Kconfig              |  11 +
>  fs/fuse/Makefile             |   1 +
>  fs/fuse/cuse.c               |   3 +-
>  fs/fuse/dev.c                |  98 ++++++---
>  fs/fuse/dir.c                |   2 +-
>  fs/fuse/file.c               |  69 ++++--
>  fs/fuse/fuse_i.h             |  72 ++++++-
>  fs/fuse/inode.c              |  25 +++
>  fs/fuse/ioctl.c              |   3 +-
>  fs/fuse/passthrough.c        | 392 +++++++++++++++++++++++++++++++++++
>  fs/fuse/readdir.c            |  12 +-
>  fs/open.c                    |  38 ----
>  fs/overlayfs/Kconfig         |   1 +
>  fs/overlayfs/file.c          | 246 ++++------------------
>  fs/overlayfs/overlayfs.h     |   8 +-
>  fs/overlayfs/super.c         |  11 +-
>  include/linux/backing-file.h |  42 ++++
>  include/linux/fs.h           |   3 -
>  include/uapi/linux/fuse.h    |  23 +-
>  23 files changed, 1085 insertions(+), 308 deletions(-)
>  create mode 100644 fs/backing-file.c
>  create mode 100644 fs/fuse/passthrough.c
>  create mode 100644 include/linux/backing-file.h
>
> --
> 2.34.1
>

  parent reply	other threads:[~2023-10-19 14:33 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 16:08 [PATCH v14 00/12] FUSE passthrough for file io Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 01/12] fs: prepare for stackable filesystems backing file helpers Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 02/12] fs: factor out backing_file_{read,write}_iter() helpers Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 03/12] fs: factor out backing_file_splice_{read,write}() helpers Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 04/12] fs: factor out backing_file_mmap() helper Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 05/12] fuse: factor out helper for FUSE_DEV_IOC_CLONE Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 06/12] fuse: introduce FUSE_PASSTHROUGH capability Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 07/12] fuse: pass optional backing_id in struct fuse_open_out Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 08/12] fuse: implement ioctls to manage backing files Amir Goldstein
2023-10-17  9:45   ` Amir Goldstein
2023-10-16 16:08 ` [PATCH v14 09/12] fuse: implement read/write passthrough Amir Goldstein
2023-10-16 16:09 ` [PATCH v14 10/12] fuse: implement splice_{read/write} passthrough Amir Goldstein
2023-10-16 16:09 ` [PATCH v14 11/12] fuse: implement passthrough for mmap Amir Goldstein
2023-10-16 16:09 ` [PATCH v14 12/12] fuse: implement passthrough for readdir Amir Goldstein
2023-10-19 14:33 ` Amir Goldstein [this message]
2023-10-30 10:16   ` [PATCH v14 00/12] FUSE passthrough for file io Miklos Szeredi
2023-10-31 10:28     ` Amir Goldstein
2023-10-31 11:16       ` Miklos Szeredi
2023-10-31 12:31         ` Amir Goldstein
2023-10-31 15:01           ` Miklos Szeredi
2023-10-31 17:44             ` Amir Goldstein
2023-11-01 11:32               ` Miklos Szeredi
2023-11-01 13:23                 ` Amir Goldstein
2023-11-01 14:42                   ` Miklos Szeredi
2023-11-01 15:06                     ` Amir Goldstein
2023-11-01 15:25                       ` Miklos Szeredi
2023-11-01 18:32                         ` Amir Goldstein
2023-11-02 10:46                           ` Miklos Szeredi
2023-11-02 13:07                             ` Amir Goldstein
2023-11-02 13:13                               ` Miklos Szeredi
2024-01-26 12:13                                 ` Amir Goldstein
2023-11-29  7:25                     ` Amir Goldstein
2023-11-29 14:13                       ` Miklos Szeredi
2023-11-29 15:06                         ` Amir Goldstein
2023-11-29 15:21                           ` Miklos Szeredi
2023-11-29 15:52                             ` Amir Goldstein
2023-11-29 16:55                               ` Miklos Szeredi
2023-11-29 17:39                                 ` Amir Goldstein
2023-11-29 20:46                                   ` Bernd Schubert
2023-11-29 21:39                                     ` Antonio SJ Musumeci
2023-11-29 22:01                                       ` Bernd Schubert
2023-11-30  7:29                                         ` Amir Goldstein
2023-11-30  7:12                                       ` Amir Goldstein
2023-11-30  8:17                                         ` Miklos Szeredi
2023-12-06  9:59                                 ` Amir Goldstein
2023-12-06 23:11                                   ` Bernd Schubert
2023-12-07  7:23                                     ` Amir Goldstein
2023-12-07  8:56                                       ` Bernd Schubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOQ4uxh=cLySge6htd+DnJrqAKF=C_oJYfVrbpvQGik0wR-+iw@mail.gmail.com' \
    --to=amir73il@gmail.com \
    --cc=balsini@android.com \
    --cc=bernd.schubert@fastmail.fm \
    --cc=brauner@kernel.org \
    --cc=drosen@google.com \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=paullawrence@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.