qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option


From: Hu Tao
Subject: Re: [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option
Date: Tue, 9 Sep 2014 11:23:45 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Sep 04, 2014 at 03:09:08PM +0200, Kevin Wolf wrote:
> Am 29.08.2014 um 10:33 hat Hu Tao geschrieben:
> > preallocation=full allocates disk space by fallocating the space if
> > posix_fallocate() is available, otherwise by writing zeros to disk to
> > ensure disk space in any cases.
> > 
> > Signed-off-by: Hu Tao <address@hidden>
> > ---
> >  block/qcow2.c              | 61 
> > +++++++++++++++++++++++++++++++++++++++-------
> >  qemu-doc.texi              |  7 +++---
> >  qemu-img.texi              |  7 +++---
> >  tests/qemu-iotests/082.out | 54 ++++++++++++++++++++--------------------
> >  4 files changed, 87 insertions(+), 42 deletions(-)
> 
> > +        qemu_opt_set_number(opts, BLOCK_OPT_SIZE,
> > +                            aligned_total_size + meta_size);
> > +        qemu_opt_set(opts, BLOCK_OPT_PREALLOC, 
> > PreallocMode_lookup[prealloc]);
> > +    }
> 
> This means that if used with a protocol that doesn't have a
> preallocation option, it gets silently ignored. I'm not completely
> decided yet whether that's a bug or a feature. :-)

We can add code to reject preallocation option if it is determined as a
bug later, but it seems not necessary currently.

Regards,
Hu



reply via email to

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