From: Fiona Ebner <f.ebner@proxmox.com>
To: Lukas Sichert <l.sichert@proxmox.com>,
Daniel Kral <d.kral@proxmox.com>,
David Riley <d.riley@proxmox.com>,
pve-devel@lists.proxmox.com
Subject: Re: [PATCH manager v3] fix #4503: ui: qemu: add detect zeroes disk option
Date: Fri, 31 Jul 2026 15:05:25 +0200 [thread overview]
Message-ID: <00c76f0c-a192-40d1-bfde-4e3b6b6bac03@proxmox.com> (raw)
In-Reply-To: <DJGHJGS9GG5N.1J6X0KX4S7DJ8@proxmox.com>
Am 23.06.26 um 4:06 PM schrieb Lukas Sichert:
> On 2026-06-22 10:51, Daniel Kral <d.kral@proxmox.com> wrote:
>> On Fri Jun 19, 2026 at 1:01 PM CEST, David Riley wrote:
>>> On 6/18/26 1:49 PM, Lukas Sichert wrote:
>>>> When discard is enabled, qemu-server defaults to 'detect-zeroes=unmap'.
>>>> This can have a significant performance impact for zero writes on some
>>>> setups, while users might still want to keep guest discard/TRIM support
>>>> enabled.
>>>>
>>>> Allow configuring the option independently so 'discard' can stay enabled
>>>> while zero detection is disabled. Persist the checkbox state explicitly,
>>>> as the backend treats an absent value as default-enabled behavior,
>>>> resulting in 'detect-zeroes=unmap' when 'discard' is enabled.
>>>
>>> Thanks for submitting this patch.
>>>
>>> While it clearly addresses the performance issues reported in #4503
>>> [0], I was reading through the Bugzilla thread and noticed a request
>>> to support the third QEMU state for detect_zeroes [1]. Currently, the
>>> underlying parameter supports off, on, and unmap [2].
>>>
>>> Since we are already modifying this configuration in the UI, it might
>>> make sense to fully expose all three options to the user rather than
>>> just a binary toggle as there is a difference between "on" and
>>> "unmap".
>>
>> This would need adapting the detect_zeroes option and parsing logic
>> (it's only boolean right now) so it can take any of the 3 valid values
>> by QEMU and be backwards compatible to the old values in our config.
>>
>> This should probably also check the constraint that detect-zeroes=unmap
>> can only be set if discard=unmap, but the error message seems already be
>> quite clear for that [0].
>
> Already in src/PVE/QemuServer/Drive.pm in the qemu-server repo, this is
> checked and set accordingly.
>
> Since detect-zeroes=unmap is essentially an extension of
> detect-zeroes=on [1], and detect-zeroes=unmap is currently the default
> when discard is enabled, I would keep this patch as is to preserve
> backward compatibility.
I also think it's fine to keep it as-is.
next prev parent reply other threads:[~2026-07-31 13:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 11:49 [PATCH manager v3] fix #4503: ui: qemu: add detect zeroes disk option Lukas Sichert
2026-06-19 11:01 ` David Riley
2026-06-22 8:51 ` Daniel Kral
2026-06-23 14:06 ` Lukas Sichert
2026-07-31 13:05 ` Fiona Ebner [this message]
2026-07-31 13:01 ` Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00c76f0c-a192-40d1-bfde-4e3b6b6bac03@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=d.kral@proxmox.com \
--cc=d.riley@proxmox.com \
--cc=l.sichert@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox