From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XONSu-0006B1-NR for qemu-devel@nongnu.org; Mon, 01 Sep 2014 05:00:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XONSp-0001HO-GR for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:59:56 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:37289 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XONSp-0001GN-8A for qemu-devel@nongnu.org; Mon, 01 Sep 2014 04:59:51 -0400 Date: Mon, 1 Sep 2014 10:59:04 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140901085904.GH15537@irqsave.net> References: <1409557394-11853-1-git-send-email-namei.unix@gmail.com> <1409557394-11853-8-git-send-email-namei.unix@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1409557394-11853-8-git-send-email-namei.unix@gmail.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 7/8] block: add two helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Yuan Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi The Monday 01 Sep 2014 =E0 15:43:13 (+0800), Liu Yuan wrote : > These helpers are needed by later quorum sync device logic. >=20 > Cc: Eric Blake > Cc: Benoit Canet > Cc: Kevin Wolf > Cc: Stefan Hajnoczi > Signed-off-by: Liu Yuan > --- > block.c | 10 ++++++++++ > include/block/block.h | 2 ++ > 2 files changed, 12 insertions(+) >=20 > diff --git a/block.c b/block.c > index 22eb3e4..2e2f1d9 100644 > --- a/block.c > +++ b/block.c > @@ -2145,6 +2145,16 @@ void *bdrv_get_attached_dev(BlockDriverState *bs= ) > return bs->dev; > } > =20 > +BlockDriverState *bdrv_get_file(BlockDriverState *bs) > +{ > + return bs->file; > +} > + > +const char *bdrv_get_filename(BlockDriverState *bs) > +{ > + return bs->filename; > +} > + I don't think why we would need this. We will see in next patch. > void bdrv_set_dev_ops(BlockDriverState *bs, const BlockDevOps *ops, > void *opaque) > { > diff --git a/include/block/block.h b/include/block/block.h > index a61eaf0..1e116cc 100644 > --- a/include/block/block.h > +++ b/include/block/block.h > @@ -237,6 +237,8 @@ int bdrv_attach_dev(BlockDriverState *bs, void *dev= ); > void bdrv_attach_dev_nofail(BlockDriverState *bs, void *dev); > void bdrv_detach_dev(BlockDriverState *bs, void *dev); > void *bdrv_get_attached_dev(BlockDriverState *bs); > +BlockDriverState *bdrv_get_file(BlockDriverState *bs); > +const char *bdrv_get_filename(BlockDriverState *bs); > void bdrv_set_dev_ops(BlockDriverState *bs, const BlockDevOps *ops, > void *opaque); > void bdrv_set_drv_ops(BlockDriverState *bs, const BlockDrvOps *ops, > --=20 > 1.9.1 >=20