qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] Use of PreallocMode in block drivers


From: Stefano Garzarella
Subject: Re: [Qemu-block] [Qemu-devel] Use of PreallocMode in block drivers
Date: Fri, 10 May 2019 10:38:53 +0200
User-agent: NeoMutt/20180716

On Thu, May 09, 2019 at 03:29:13PM +0200, Peter Krempa wrote:
> On Thu, May 09, 2019 at 10:26:46 +0200, Stefano Garzarella wrote:
> > On Wed, May 08, 2019 at 01:44:27PM +0200, Markus Armbruster wrote:
> > > Stefano Garzarella <address@hidden> writes:
> > > 
> > > > On Tue, May 07, 2019 at 08:34:51AM +0200, Markus Armbruster wrote:
> > > >> Cc: Peter for a libvirt perspective.
> > > >> 
> > > >> Stefano Garzarella <address@hidden> writes:
> > > >> 
> > > >> > This patch adds the support of preallocation (off/full) for the RBD
> > > >> > block driver.
> > > >> > If available, we use rbd_writesame() to quickly fill the image when
> > > >> > full preallocation is required.
> > > >> >
> > > >> > Signed-off-by: Stefano Garzarella <address@hidden>
> > > >> > ---
> > > >> >  block/rbd.c          | 149 
> > > >> > ++++++++++++++++++++++++++++++++++++++-----
> > > >> >  qapi/block-core.json |   4 +-
> > > >> >  2 files changed, 136 insertions(+), 17 deletions(-)
> 
> [...]
> 
> 
> > > >> >  ##
> > > >> >  # @BlockdevVmdkSubformat:
> > > >> 
> > > >> The non-support of values 'metadata' and 'falloc' is not visible in
> > > >> introspection, only in documentation.  No reason to block this patch, 
> > > >> as
> > > >> the other block drivers have the same introspection weakness (only
> > > >> sheepdog and vdi bother to document).
> > > >> 
> > > >> Should we address the introspection weakness?  Only if there's a use 
> > > >> for
> > > >> the information, I think.
> > > >
> > > > If the management applications will use that information (or maybe also
> > > > our help pages), could be useful to have an array of 'PreallocMode'
> > > > supported per-driver.
> > > 
> > > Ideally, query-qmp-schema would show only the supported values.
> > > 
> > > Not hard to do, just tedious: we'd get a number of sub-enums in addition
> > > to the full one, and we'd have to map from sub-enum to the full one.
> > > 
> > > QAPI language support for sub-enums would remove most of the tedium.
> > > Not worthwhile unless the need for sub-enums is actually common.
> > 
> > I should study better the QMP and QAPI to understand how to implement
> > the sub-enums.
> > 
> > If you agree, I'll put it as a background task, until somebody from
> > management applications tell us his interest.
> 
> Sorry for the late response. Libvirt currently does not deal that much
> with the preallocation settings. Preallocation isn't in current state
> implemented at all for 'blockdev-create' and only the 'metadata' and
> 'falloc' modes are used in the storage driver via qemu-img.
> 
> We currently hardcode the knowledge for which formats actually support
> it internally.
> 
> I'd say it's not criticall to expose this in the QMP schema but
> obviously if we'll ever need to use it for a recent enough qemu it's
> welcome to have a way to check.

Thank you for sharing this information!

Cheers,
Stefano



reply via email to

[Prev in Thread] Current Thread [Next in Thread]