From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0300-00087c-UF for qemu-devel@nongnu.org; Fri, 19 Jul 2013 01:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V02zz-00068t-UM for qemu-devel@nongnu.org; Fri, 19 Jul 2013 01:13:00 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:37932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V02zz-00068m-Ge for qemu-devel@nongnu.org; Fri, 19 Jul 2013 01:12:59 -0400 Received: by mail-wi0-f169.google.com with SMTP id c10so196849wiw.4 for ; Thu, 18 Jul 2013 22:12:58 -0700 (PDT) Date: Fri, 19 Jul 2013 13:12:49 +0800 From: Stefan Hajnoczi Message-ID: <20130719051249.GD14330@stefanha-thinkpad.redhat.com> References: <1373885375-13601-1-git-send-email-pl@kamp.de> <1373885375-13601-4-git-send-email-pl@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1373885375-13601-4-git-send-email-pl@kamp.de> Subject: Re: [Qemu-devel] [PATCH 3/4] block/raw: add .bdrv_get_info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org, ronniesahlberg@gmail.com On Mon, Jul 15, 2013 at 12:49:34PM +0200, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block/raw.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/block/raw.c b/block/raw.c > index 8c81de9..f1682d4 100644 > --- a/block/raw.c > +++ b/block/raw.c > @@ -121,6 +121,11 @@ static int raw_has_zero_init(BlockDriverState *bs) > return bdrv_has_zero_init(bs->file); > } > > +static int raw_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) > +{ > + return bdrv_get_info(bs->file, bdi); > +} > + > static BlockDriver bdrv_raw = { > .format_name = "raw", > > @@ -140,6 +145,7 @@ static BlockDriver bdrv_raw = { > > .bdrv_probe = raw_probe, > .bdrv_getlength = raw_getlength, > + .bdrv_get_info = raw_get_info, I checked BlockDriverInfo to make sure the fields still make sense for the raw BlockDriverState. The vm_state_offset field is questionable, since the raw BDS doesn't know about vmstate and you certainly cannot write to it. If protocols start supporting vmstate we might have to rework that anyway, so I'm happy with this patch. Stefan