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



Reply via email to