From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNh1y-0004sl-Ml for qemu-devel@nongnu.org; Mon, 25 Jan 2016 08:18:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNh1x-0005Jg-Ph for qemu-devel@nongnu.org; Mon, 25 Jan 2016 08:18:06 -0500 Date: Mon, 25 Jan 2016 14:17:54 +0100 From: Kevin Wolf Message-ID: <20160125131754.GF5154@noname.redhat.com> References: <1453689887-2567-1-git-send-email-famz@redhat.com> <1453689887-2567-5-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453689887-2567-5-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v8 04/15] raw: Assign bs to file in raw_co_get_block_status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, Stefan Hajnoczi , pbonzini@redhat.com Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > Reviewed-by: Eric Blake > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Fam Zheng > --- > block/raw-posix.c | 1 + > block/raw_bsd.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/block/raw-posix.c b/block/raw-posix.c > index 3ef9b25..8866121 100644 > --- a/block/raw-posix.c > +++ b/block/raw-posix.c > @@ -1861,6 +1861,7 @@ static int64_t coroutine_fn raw_co_get_block_status(BlockDriverState *bs, > *pnum = MIN(nb_sectors, (data - start) / BDRV_SECTOR_SIZE); > ret = BDRV_BLOCK_ZERO; > } > + *file = bs; > return ret | BDRV_BLOCK_OFFSET_VALID | start; > } > > diff --git a/block/raw_bsd.c b/block/raw_bsd.c > index 9a8933b..fd355d5 100644 > --- a/block/raw_bsd.c > +++ b/block/raw_bsd.c > @@ -119,6 +119,7 @@ static int64_t coroutine_fn raw_co_get_block_status(BlockDriverState *bs, > BlockDriverState **file) > { > *pnum = nb_sectors; > + *file = bs; This should be bs->file->bs. > return BDRV_BLOCK_RAW | BDRV_BLOCK_OFFSET_VALID | BDRV_BLOCK_DATA | > (sector_num << BDRV_SECTOR_BITS); > } Kevin