qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Asias He <asias@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org,
	MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>,
	Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof
Date: Thu, 22 Aug 2013 15:25:34 +0800	[thread overview]
Message-ID: <20130822072534.GA8147@hj.localdomain> (raw)
In-Reply-To: <20130821154408.GC18303@stefanha-thinkpad.redhat.com>

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

      parent reply	other threads:[~2013-08-22  7:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21  8:26 [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof Asias He
2013-08-21 15:44 ` Stefan Hajnoczi
2013-08-22  7:24   ` [Qemu-devel] [PATCH v2] " Asias He
2013-08-22 12:12     ` Stefan Hajnoczi
2013-08-23  2:28       ` Asias He
2013-08-22  7:25   ` Asias He [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130822072534.GA8147@hj.localdomain \
    --to=asias@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=morita.kazutaka@lab.ntt.co.jp \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).