From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3N2R-0003rq-Fk for qemu-devel@nongnu.org; Wed, 15 Jan 2014 04:45:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3N2L-0005w6-EW for qemu-devel@nongnu.org; Wed, 15 Jan 2014 04:45:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3N2L-0005vs-46 for qemu-devel@nongnu.org; Wed, 15 Jan 2014 04:45:25 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0F9jOEJ021462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 Jan 2014 04:45:24 -0500 Message-ID: <52D658B1.6010307@redhat.com> Date: Wed, 15 Jan 2014 10:45:21 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: add .bdrv_reopen_prepare() stub for iscsi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Il 14/01/2014 19:10, Jeff Cody ha scritto: > To suppport reopen(), the .bdrv_reopen_prepare() stub must exist. > iSCSI does not have anything that needs to be done to support reopen, > so we can just implement the _prepare() stub. > > Signed-off-by: Jeff Cody > --- > block/iscsi.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/block/iscsi.c b/block/iscsi.c > index c0ea0c4..5976bd1 100644 > --- a/block/iscsi.c > +++ b/block/iscsi.c > @@ -1326,6 +1326,14 @@ static void iscsi_close(BlockDriverState *bs) > memset(iscsilun, 0, sizeof(IscsiLun)); > } > > +/* We have nothing to do for iSCSI reopen, stub just returns > + * success */ > +static int iscsi_reopen_prepare(BDRVReopenState *state, > + BlockReopenQueue *queue, Error **errp) > +{ > + return 0; > +} > + > static int iscsi_truncate(BlockDriverState *bs, int64_t offset) > { > IscsiLun *iscsilun = bs->opaque; > @@ -1434,6 +1442,7 @@ static BlockDriver bdrv_iscsi = { > .bdrv_close = iscsi_close, > .bdrv_create = iscsi_create, > .create_options = iscsi_create_options, > + .bdrv_reopen_prepare = iscsi_reopen_prepare, > > .bdrv_getlength = iscsi_getlength, > .bdrv_get_info = iscsi_get_info, > Applied to scsi-next branch, thanks. Paolo