qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v3 2/6] block: add BlockDriver.bdrv_prealloc


From: Hu Tao
Subject: Re: [Qemu-devel] [RFC PATCH v3 2/6] block: add BlockDriver.bdrv_preallocate.
Date: Tue, 24 Dec 2013 16:31:11 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Dec 20, 2013 at 11:10:30AM +0100, Stefan Hajnoczi wrote:
> On Thu, Dec 19, 2013 at 10:27:37AM +0800, Hu Tao wrote:
> > diff --git a/block.c b/block.c
> > index 64e7d22..b901587 100644
> > --- a/block.c
> > +++ b/block.c
> > @@ -3216,6 +3216,19 @@ bool 
> > bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs)
> >      return false;
> >  }
> >  
> > +int bdrv_preallocate(BlockDriverState *bs, int64_t offset, int64_t length)
> > +{
> > +    if (bs->backing_hd) {
> > +        return -ENOTSUP;
> > +    }
> 
> Depending on the image file format it may be possible to preallocate
> metadata while using a backing file.  Why prevent this?

I thought in the case we have no need to preallocate forbacking file.
But yes, we can also preallocate for bs when there is backing file.
Thanks!



reply via email to

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