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 <hu...@cn.fujitsu.com> > > --- > > 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