[PATCH 0/3] block/export/fuse: set FUSE_DIRECT_IO_ALLOW_MMAP flag to fix regression

Fiona Ebner posted 3 patches 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260506145424.10249-1-f.ebner@proxmox.com
Maintainers: Hanna Reitz <hreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
block/export/fuse.c                           |  69 +++++++++---
tests/qemu-iotests/tests/fuse-mmap-shared     | 103 ++++++++++++++++++
tests/qemu-iotests/tests/fuse-mmap-shared.out |   5 +
3 files changed, 161 insertions(+), 16 deletions(-)
create mode 100755 tests/qemu-iotests/tests/fuse-mmap-shared
create mode 100644 tests/qemu-iotests/tests/fuse-mmap-shared.out
[PATCH 0/3] block/export/fuse: set FUSE_DIRECT_IO_ALLOW_MMAP flag to fix regression
Posted by Fiona Ebner 1 week, 6 days ago
Commit 8599559580 ("fuse: Set direct_io and parallel_direct_writes")
broke use cases that require mmap() with MAP_SHARED on the export. In
particular, swtpm_setup using its 'file://' protocol requires this.
This is mentioned in the kernel documentation [0]:

> To allow shared mmap, the FUSE_DIRECT_IO_ALLOW_MMAP flag may be
> enabled in the FUSE_INIT reply.

[0]: https://www.kernel.org/doc/html/next/filesystems/fuse/fuse-io.html

Set the FUSE_DIRECT_IO_ALLOW_MMAP flag to restore compatibility with
users requiring shared mmap.

Fiona Ebner (3):
  block/export/fuse: use struct fuse_init_in
  block/export/fuse: set FUSE_DIRECT_IO_ALLOW_MMAP flag to fix
    regression
  iotests: test shared mmap for fuse export

 block/export/fuse.c                           |  69 +++++++++---
 tests/qemu-iotests/tests/fuse-mmap-shared     | 103 ++++++++++++++++++
 tests/qemu-iotests/tests/fuse-mmap-shared.out |   5 +
 3 files changed, 161 insertions(+), 16 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/fuse-mmap-shared
 create mode 100644 tests/qemu-iotests/tests/fuse-mmap-shared.out

-- 
2.47.3