qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof


From: Asias He
Subject: Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof
Date: Thu, 22 Aug 2013 15:25:34 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Aug 21, 2013 at 05:44:08PM +0200, Stefan Hajnoczi wrote:
> On Wed, Aug 21, 2013 at 04:26:04PM +0800, Asias He wrote:
> > @@ -868,6 +868,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char 
> > *filename,
> >      QDECREF(options);
> >  
> >      bs->growable = 1;
> > +    bs->zero_beyond_eof = true;
> >      *pbs = bs;
> >      return 0;
> >  
> > @@ -978,6 +979,7 @@ int bdrv_open(BlockDriverState *bs, const char 
> > *filename, QDict *options,
> >      }
> >  
> >      bs->options = options;
> > +    bs->zero_beyond_eof = true;
> >      options = qdict_clone_shallow(options);
> >  
> >      /* For snapshot=on, create a temporary qcow2 overlay */
> 
> We chatted about whether to duplicate bs->zero_beyond_eof = true on IRC.
> Now I think you could put it in bdrv_open_common() to avoid duplication.
> Every BDS should have ->zero_beyond_eof = true by default.

Nice. v2 is on its way.

> Stefan

-- 
Asias



reply via email to

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