On Thu, Dec 19, 2013 at 10:27:40AM +0800, Hu Tao wrote: > Signed-off-by: Hu Tao <hu...@cn.fujitsu.com> > --- > block/qcow2.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/block/qcow2.c b/block/qcow2.c > index 32cb39f..487a595 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -2188,6 +2188,12 @@ static int qcow2_amend_options(BlockDriverState *bs, > return 0; > } > > +static int qcow2_preallocate(BlockDriverState *bs, int64_t offset, > + int64_t length) > +{ > + return bdrv_preallocate(bs->file, offset, length); > +}
What about qcow2-level preallocation (metadata)? I'm not sure what the meaning of offset and length are here - are they supposed to be virtual disk LBAs. They are being passed through to bs->file so they actually become physical file offsets.