[GIT PULL] fuse update for 6.9

From: Miklos Szeredi
Date: Thu Mar 14 2024 - 11:41:20 EST


Hi Linus,

Please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git
tags/fuse-update-6.9

- Add passthrough mode for regular file I/O. This allows performing
read and write (also via memory maps) on a backing file without
incurring the overhead of roundtrips to userspace. For now this is
only allowed to privileged servers, but this limitation will go away
in the future. (Amir Goldstein)

- Fix interaction of direct I/O mode with memory maps (Bernd Schubert)

- Export filesystem tags through sysfs for virtiofs (Stefan Hajnoczi)

- Allow resending queued requests for server crash recovery (Zhao Chen)

- Misc fixes and cleanups

There's a conflict in fs/fuse/inode.c. The resolution (attached) is
to leave the fuse_backing_files_free() call in fuse_conn_put(), before
call_rcu().

Thanks,
Miklos

---
Alexander Mikhalitsyn (2):
fuse: fix typo for fuse_permission comment
fuse: __kuid_val/__kgid_val helpers in fuse_fill_attr_from_inode()

Amir Goldstein (14):
fuse: factor out helper fuse_truncate_update_attr()
fuse: allocate ff->release_args only if release is needed
fuse: break up fuse_open_common()
fuse: prepare for failing open response
fuse: introduce inode io modes
fuse: allow parallel dio writes with FUSE_DIRECT_IO_ALLOW_MMAP
fuse: factor out helper for FUSE_DEV_IOC_CLONE
fuse: introduce FUSE_PASSTHROUGH capability
fuse: implement ioctls to manage backing files
fuse: prepare for opening file in passthrough mode
fuse: implement open in passthrough mode
fuse: implement read/write passthrough
fuse: implement splice read/write passthrough
fuse: implement passthrough for mmap

Bernd Schubert (3):
fuse: fix VM_MAYSHARE and direct_io_allow_mmap
fuse: create helper function if DIO write needs exclusive lock
fuse: add fuse_dio_lock/unlock helper functions

Jiachen Zhang (1):
fuse: remove an unnecessary if statement

Jingbo Xu (1):
fuse: add support for explicit export disabling

Kemeng Shi (1):
fuse: remove unneeded lock which protecting update of congestion_threshold

Lei Huang (1):
fuse: Fix missing FOLL_PIN for direct-io

Li RongQing (1):
virtio_fs: remove duplicate check if queue is broken

Matthew Wilcox (Oracle) (2):
fuse: Remove fuse_writepage
fuse: Convert fuse_writepage_locked to take a folio

Miklos Szeredi (5):
fuse: replace remaining make_bad_inode() with fuse_make_bad()
fuse: fix root lookup with nonzero generation
fuse: don't unhash root
fuse: use FUSE_ROOT_ID in fuse_get_root_inode()
fuse: get rid of ff->readdir.lock

Stefan Hajnoczi (4):
virtiofs: forbid newlines in tags
virtiofs: export filesystem tags through sysfs
virtiofs: emit uevents on filesystem events
virtiofs: drop __exit from virtio_fs_sysfs_exit()

Zhao Chen (2):
fuse: Introduce a new notification type for resend pending requests
fuse: Use the high bit of request ID for indicating resend requests

Zhou Jifeng (1):
fuse: Track process write operations in both direct and writethrough modes

---
Documentation/ABI/testing/sysfs-fs-virtiofs | 11 +
fs/fuse/Kconfig | 11 +
fs/fuse/Makefile | 2 +
fs/fuse/control.c | 6 +-
fs/fuse/dev.c | 156 ++++++++--
fs/fuse/dir.c | 55 +++-
fs/fuse/file.c | 457 +++++++++++++++++-----------
fs/fuse/fuse_i.h | 153 ++++++++--
fs/fuse/inode.c | 55 +++-
fs/fuse/iomode.c | 254 ++++++++++++++++
fs/fuse/passthrough.c | 355 +++++++++++++++++++++
fs/fuse/readdir.c | 4 -
fs/fuse/virtio_fs.c | 141 +++++++--
include/uapi/linux/fuse.h | 39 ++-
14 files changed, 1422 insertions(+), 277 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-fs-virtiofs
create mode 100644 fs/fuse/iomode.c
create mode 100644 fs/fuse/passthrough.c
diff --cc fs/fuse/inode.c
index 516ea2979a90,02869edf72f3..3a5d88878335
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@@ -954,7 -959,9 +966,9 @@@ void fuse_conn_put(struct fuse_conn *fc
WARN_ON(atomic_read(&bucket->count) != 1);
kfree(bucket);
}
+ if (IS_ENABLED(CONFIG_FUSE_PASSTHROUGH))
+ fuse_backing_files_free(fc);
- fc->release(fc);
+ call_rcu(&fc->rcu, delayed_release);
}
}
EXPORT_SYMBOL_GPL(fuse_conn_put);