From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id C80961FF13A for ; Wed, 13 May 2026 14:36:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A037FC3F3; Wed, 13 May 2026 14:36:57 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 13 May 2026 14:36:52 +0200 Message-Id: To: "Fiona Ebner" , Subject: Re: [PATCH qemu] add fix for regression when using fuse export for EFI enroll From: "Lukas Sichert" References: <20260512153756.311383-1-f.ebner@proxmox.com> In-Reply-To: <20260512153756.311383-1-f.ebner@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778675809561 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.507 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: T5Q5ONMAGFTQPIOOUC7EJ4FBZWGD5DKL X-Message-ID-Hash: T5Q5ONMAGFTQPIOOUC7EJ4FBZWGD5DKL X-MailFrom: l.sichert@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 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@p= roxmox.com/ > > Signed-off-by: Fiona Ebner > --- > ...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-regre= ssion-with-block-device-e.patch > > diff --git a/debian/patches/extra/0013-block-export-fuse-fix-regression-w= ith-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-blo= ck-device-e.patch > @@ -0,0 +1,36 @@ > +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 > +From: Fiona Ebner > +Date: Tue, 12 May 2026 17:16:23 +0200 > +Subject: [PATCH] block/export/fuse: fix regression with block device exp= ort or > + growable=3Doff 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=3Doff and/or a block device based export for setting the flag. > + > +Signed-off-by: Fiona Ebner > +--- > + 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 =3D FUSE_ASYNC_READ | FUSE_ASYNC_DIO= | FUSE_INIT_EXT; > ++ const uint32_t supported_flags =3D FUSE_ASYNC_READ | FUSE_ASYNC_DIO > ++ | FUSE_INIT_EXT | FUSE_ATOMIC_O_TRUNC; > + const uint32_t supported_flags2 =3D (FUSE_DIRECT_IO_ALLOW_MMAP >> 3= 2); > +=20 > + if (in->major !=3D 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.p= atch > bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.= patch > bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch > --=20 > 2.47.3