* [PATCH qemu] add fix for regression when using fuse export for EFI enroll
@ 2026-05-12 15:37 Fiona Ebner
2026-05-12 21:51 ` applied: " Thomas Lamprecht
2026-05-13 12:36 ` Lukas Sichert
0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2026-05-12 15:37 UTC (permalink / raw)
To: pve-devel
The virt-fw-vars binary for EFI enrollment opens the target file with
O_TRUNC when writing the result and this caused issues since QEMU
commit a94a1d7699 ("fuse: Manually process requests (without
libfuse)"), because the FUSE_ATOMIC_O_TRUNC FUSE flag was implicitly
dropped. Restore the flag to avoid the regression.
Upstream discussion:
https://lore.kernel.org/qemu-devel/9be52b33-9a28-41ca-896c-a41b5558864c@proxmox.com/
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
...e-fix-regression-with-block-device-e.patch | 36 +++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 37 insertions(+)
create mode 100644 debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
diff --git a/debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch b/debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
new file mode 100644
index 0000000000..121e5712cd
--- /dev/null
+++ b/debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Fiona Ebner <f.ebner@proxmox.com>
+Date: Tue, 12 May 2026 17:16:23 +0200
+Subject: [PATCH] block/export/fuse: fix regression with block device export or
+ growable=off and O_TRUNC
+
+Before commit a94a1d7699 ("fuse: Manually process requests (without
+libfuse)"), libfuse was used which set the FUSE_ATOMIC_O_TRUNC flag.
+After the commit, the flag is not set anymore cause a regression where
+opening a block-based export with O_TRUNC fails with EOPNOTSUPP. And
+it also causes a regression with file-based exports, since they would
+be truncated upon opening with O_TRUNC, but then subsequent writes to
+the file would not be possible, since it's not growable.
+
+A proper upstream submission might want to conditionalize on having
+growable=off and/or a block device based export for setting the flag.
+
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ block/export/fuse.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/block/export/fuse.c b/block/export/fuse.c
+index ef381fd844..7a7386c904 100644
+--- a/block/export/fuse.c
++++ b/block/export/fuse.c
+@@ -816,7 +816,8 @@ static ssize_t coroutine_fn GRAPH_RDLOCK
+ fuse_co_init(FuseExport *exp, struct fuse_init_out *out,
+ const struct fuse_init_in *in)
+ {
+- const uint32_t supported_flags = FUSE_ASYNC_READ | FUSE_ASYNC_DIO | FUSE_INIT_EXT;
++ const uint32_t supported_flags = FUSE_ASYNC_READ | FUSE_ASYNC_DIO
++ | FUSE_INIT_EXT | FUSE_ATOMIC_O_TRUNC;
+ const uint32_t supported_flags2 = (FUSE_DIRECT_IO_ALLOW_MMAP >> 32);
+
+ if (in->major != 7) {
diff --git a/debian/patches/series b/debian/patches/series
index 39da6dff13..602d1a8eee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,6 +10,7 @@ extra/0009-target-i386-fix-strList-leak-in-x86_cpu_get_unavaila.patch
extra/0010-target-i386-fix-missing-PF_INSTR-in-SIGSEGV-context.patch
extra/0011-migration-vmstate_save_state_v-fix-double-error_setg.patch
extra/0012-block-export-fuse-fix-regression-when-mmap-ing-expor.patch
+extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* applied: [PATCH qemu] add fix for regression when using fuse export for EFI enroll
2026-05-12 15:37 [PATCH qemu] add fix for regression when using fuse export for EFI enroll Fiona Ebner
@ 2026-05-12 21:51 ` Thomas Lamprecht
2026-05-13 12:36 ` Lukas Sichert
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-05-12 21:51 UTC (permalink / raw)
To: pve-devel, Fiona Ebner
On Tue, 12 May 2026 17:37:20 +0200, Fiona Ebner wrote:
> The virt-fw-vars binary for EFI enrollment opens the target file with
> O_TRUNC when writing the result and this caused issues since QEMU
> commit a94a1d7699 ("fuse: Manually process requests (without
> libfuse)"), because the FUSE_ATOMIC_O_TRUNC FUSE flag was implicitly
> dropped. Restore the flag to avoid the regression.
>
> Upstream discussion:
> https://lore.kernel.org/qemu-devel/9be52b33-9a28-41ca-896c-a41b5558864c@proxmox.com/
>
> [...]
Applied, thanks!
[1/1] add fix for regression when using fuse export for EFI enroll
commit: 334c4d65cf0c0991be42e53e9d037127a3a473bd
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH qemu] add fix for regression when using fuse export for EFI enroll
2026-05-12 15:37 [PATCH qemu] add fix for regression when using fuse export for EFI enroll Fiona Ebner
2026-05-12 21:51 ` applied: " Thomas Lamprecht
@ 2026-05-13 12:36 ` Lukas Sichert
1 sibling, 0 replies; 3+ messages in thread
From: Lukas Sichert @ 2026-05-13 12:36 UTC (permalink / raw)
To: Fiona Ebner, pve-devel
Thanks for fixing this. On my machine I hit 'apt update && apt
dist-upgrade' while the Vm, where the error appeard, was running. Then
in the stop task description I could see, that the pending changes were
applied correctly. After that no warning appeared anymore.
On 2026-05-12 17:37, Fiona Ebner <f.ebner@proxmox.com> wrote:
> The virt-fw-vars binary for EFI enrollment opens the target file with
> O_TRUNC when writing the result and this caused issues since QEMU
> commit a94a1d7699 ("fuse: Manually process requests (without
> libfuse)"), because the FUSE_ATOMIC_O_TRUNC FUSE flag was implicitly
> dropped. Restore the flag to avoid the regression.
>
> Upstream discussion:
> https://lore.kernel.org/qemu-devel/9be52b33-9a28-41ca-896c-a41b5558864c@proxmox.com/
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> ...e-fix-regression-with-block-device-e.patch | 36 +++++++++++++++++++
> debian/patches/series | 1 +
> 2 files changed, 37 insertions(+)
> create mode 100644 debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
>
> diff --git a/debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch b/debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
> new file mode 100644
> index 0000000000..121e5712cd
> --- /dev/null
> +++ b/debian/patches/extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
> @@ -0,0 +1,36 @@
> +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
> +From: Fiona Ebner <f.ebner@proxmox.com>
> +Date: Tue, 12 May 2026 17:16:23 +0200
> +Subject: [PATCH] block/export/fuse: fix regression with block device export or
> + growable=off and O_TRUNC
> +
> +Before commit a94a1d7699 ("fuse: Manually process requests (without
> +libfuse)"), libfuse was used which set the FUSE_ATOMIC_O_TRUNC flag.
> +After the commit, the flag is not set anymore cause a regression where
> +opening a block-based export with O_TRUNC fails with EOPNOTSUPP. And
> +it also causes a regression with file-based exports, since they would
> +be truncated upon opening with O_TRUNC, but then subsequent writes to
> +the file would not be possible, since it's not growable.
> +
> +A proper upstream submission might want to conditionalize on having
> +growable=off and/or a block device based export for setting the flag.
> +
> +Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> +---
> + block/export/fuse.c | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/block/export/fuse.c b/block/export/fuse.c
> +index ef381fd844..7a7386c904 100644
> +--- a/block/export/fuse.c
> ++++ b/block/export/fuse.c
> +@@ -816,7 +816,8 @@ static ssize_t coroutine_fn GRAPH_RDLOCK
> + fuse_co_init(FuseExport *exp, struct fuse_init_out *out,
> + const struct fuse_init_in *in)
> + {
> +- const uint32_t supported_flags = FUSE_ASYNC_READ | FUSE_ASYNC_DIO | FUSE_INIT_EXT;
> ++ const uint32_t supported_flags = FUSE_ASYNC_READ | FUSE_ASYNC_DIO
> ++ | FUSE_INIT_EXT | FUSE_ATOMIC_O_TRUNC;
> + const uint32_t supported_flags2 = (FUSE_DIRECT_IO_ALLOW_MMAP >> 32);
> +
> + if (in->major != 7) {
> diff --git a/debian/patches/series b/debian/patches/series
> index 39da6dff13..602d1a8eee 100644
> --- a/debian/patches/series
> +++ b/debian/patches/series
> @@ -10,6 +10,7 @@ extra/0009-target-i386-fix-strList-leak-in-x86_cpu_get_unavaila.patch
> extra/0010-target-i386-fix-missing-PF_INSTR-in-SIGSEGV-context.patch
> extra/0011-migration-vmstate_save_state_v-fix-double-error_setg.patch
> extra/0012-block-export-fuse-fix-regression-when-mmap-ing-expor.patch
> +extra/0013-block-export-fuse-fix-regression-with-block-device-e.patch
> bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
> bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
> bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
> --
> 2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-13 12:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 15:37 [PATCH qemu] add fix for regression when using fuse export for EFI enroll Fiona Ebner
2026-05-12 21:51 ` applied: " Thomas Lamprecht
2026-05-13 12:36 ` Lukas Sichert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox