public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Daniel Kral" <d.kral@proxmox.com>
To: "David Riley" <d.riley@proxmox.com>,
	"Lukas Sichert" <l.sichert@proxmox.com>,
	<pve-devel@lists.proxmox.com>
Subject: Re: [PATCH manager v3] fix #4503: ui: qemu: add detect zeroes disk option
Date: Mon, 22 Jun 2026 10:51:09 +0200	[thread overview]
Message-ID: <DJFG7AYIOTAS.270SDV4FZWCSQ@proxmox.com> (raw)
In-Reply-To: <7a2d0777-1fb4-4a87-99ed-2c77caa0082b@proxmox.com>

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].

[0] https://gitlab.com/qemu-project/qemu/-/blob/master/block.c?ref_type=heads#L1120

>
> [0] https://bugzilla.proxmox.com/show_bug.cgi?id=4503
> [1] https://bugzilla.proxmox.com/show_bug.cgi?id=4503#c8
> [2] https://www.qemu.org/docs/master/interop/qemu-storage-daemon-qmp-ref.html#enum-QSD-block-core.BlockdevDetectZeroesOptions
>
>> Link: https://bugzilla.proxmox.com/show_bug.cgi?id=4503
>> Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
>> ---
>>
>> Notes:
>>      changes from v2 to v3 (thanks @Fabian):
>>      - add a comment explaining why this property is handled differently from
>>        the others
>>      
>>      changes from v1 to v2:
>>      - added bug-numer to commit header
>>      - appended bug-link to commit body
>>
>>   www/manager6/qemu/HDEdit.js | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> [...]
>>






  reply	other threads:[~2026-06-22  8:51 UTC|newest]

Thread overview: 4+ 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 [this message]
2026-06-23 14:06     ` Lukas Sichert

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=DJFG7AYIOTAS.270SDV4FZWCSQ@proxmox.com \
    --to=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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal