[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] block: Introduce bs->zero_beyond_eof |
Date: |
Wed, 21 Aug 2013 17:44:08 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
Stefan