all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>,
	"pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-storage] qcow2: resize: add preallocation support
Date: Tue, 4 Feb 2025 10:21:17 +0100	[thread overview]
Message-ID: <0acddfdd-e649-43f0-99c0-5cb609a341d3@proxmox.com> (raw)
In-Reply-To: <9b0bfadfca34c384ec139a8a08b7edcdb414da7e.camel@groupe-cyllene.com>

Am 03.02.25 um 17:11 schrieb DERUMIER, Alexandre:
> -------- Message initial --------
> De: Fiona Ebner <f.ebner@proxmox.com>
>>> Hmm, I wanted to suggest to query the image to see what kind of
>>> preallocation it was created with and then use that setting to stay
>>> consistent. 
>>> But that information doesn't seem to get recorded (on an
>>> image-wide level) AFAICS.
> 
> for full pre-allocation, I think we can simply check the current qcow2
> usage vs the size configured.
> 
> for qcow2 metadatas, I really don't known any way to do it.
> 

We don't need to do it based on heuristics. It's really not worth the
effort then IMHO. I just kinda expected to be an image property at
first, but it does make sense that allocation is per-cluster.

>>> It might be surprising that changes to the
>>> storage configuration setting will also apply to already existing
>>> images
> 
> Personnaly, I was more surprised than this never have worked on resize
> before ^_^.
> 
> That don't shock me that it's respect the current assigned option at
> the moment of the resize.

Fair :)

> 
>>> and we should document the behavior for resize in the description of
>>> the
>>> 'preallocation' setting.
> 
> But yes, it should be documented.
> I'll write a patch of pve-docs

Great! There also is the schema in Plugin.pm ;)

> 
> 
>>> Seems like the "block_resize" QMP command does not have the setting
>>> at
>>> all, so if we add it here, the behavior would still be inconsistent
>>> in
>>> that regard :/ But oh well, could still be added on top later if we
>>> can
>>> get that feature in upstream. But should also be documented, that it
>>> doesn't apply for live resize.
> 
> yes, indeed, it doesn't exist for live running image. (I think to have
> seen discussion on the qemu mailing about it, but it require some kind
> of block job if I remember correctly).

I guess that makes sense, because it can be longer running. I noted that
qmp_block_resize() is already a coroutine, maybe that can be leveraged
if we were to implement the feature for live resize. But again, won't be
a blocker here and can still be considered later.

> 
> It's existing a preallocate-filter 
> 
> https://qemu.googlesource.com/qemu/+/refs/tags/v8.0.3/block/preallocate.c
> 
> but it's a little bit different, it's preallocating live.
> (allocating by chunk of 1MB for example, when you have a 4k write
> reaching EOF)

Okay, so not quite what we want here.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

      parent reply	other threads:[~2025-02-04  9:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19 16:18 Alexandre Derumier via pve-devel
2025-02-03 14:39 ` Fiona Ebner
2025-02-03 16:11   ` DERUMIER, Alexandre via pve-devel
     [not found]   ` <9b0bfadfca34c384ec139a8a08b7edcdb414da7e.camel@groupe-cyllene.com>
2025-02-04  9:21     ` Fiona Ebner [this message]

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=0acddfdd-e649-43f0-99c0-5cb609a341d3@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=alexandre.derumier@groupe-cyllene.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal