[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 01/15] block: Add "file" output parameter to
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v3 01/15] block: Add "file" output parameter to block status query functions |
Date: |
Mon, 30 Nov 2015 17:09:49 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, 11/30 16:38, Stefan Hajnoczi wrote:
> On Thu, Nov 26, 2015 at 01:05:21PM +0800, Fam Zheng wrote:
> > @@ -1535,13 +1541,14 @@ static int64_t coroutine_fn
> > bdrv_co_get_block_status(BlockDriverState *bs,
> > }
> > }
> >
> > - if (bs->file &&
> > + if (*file && *file != bs &&
> > (ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) &&
> > (ret & BDRV_BLOCK_OFFSET_VALID)) {
>
> What is the purpose of this change?
The code here is to sensibly detect "zero" by going into the "file" which the
offset is valid for. Now the "file" is no longer always "bs->file", so we use
the returned "file" pointer instead.
Fam
- [Qemu-devel] [PATCH v3 00/15] qemu-img map: Allow driver to return file of the allocated block, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 01/15] block: Add "file" output parameter to block status query functions, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 02/15] qcow: Assign bs->file->bs to file in qcow_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 03/15] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 04/15] raw: Assign bs to file in raw_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 05/15] iscsi: Assign bs to file in iscsi_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 06/15] parallels: Assign bs->file->bs to file in parallels_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 07/15] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 08/15] sheepdog: Assign bs to file in sd_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 09/15] vdi: Assign bs->file->bs to file in vdi_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 10/15] vpc: Assign bs->file->bs to file in vpc_co_get_block_status, Fam Zheng, 2015/11/26
- [Qemu-devel] [PATCH v3 11/15] vmdk: Return extent's file in bdrv_get_block_status, Fam Zheng, 2015/11/26