From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMF6i-0001fo-2k for qemu-devel@nongnu.org; Mon, 03 Aug 2015 08:44:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMF6h-0008BW-7Y for qemu-devel@nongnu.org; Mon, 03 Aug 2015 08:44:44 -0400 Date: Mon, 3 Aug 2015 08:44:10 -0400 (EDT) From: Paolo Bonzini Message-ID: <1326598126.5100353.1438605850889.JavaMail.zimbra@redhat.com> In-Reply-To: <20150803124049.GA9878@localhost.localdomain> References: <1438595557-28144-1-git-send-email-pbonzini@redhat.com> <20150803124049.GA9878@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] sheepdog: remove back pointer to BlockDriverState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: mitake hitoshi , namei unix , qemu-devel@nongnu.org, qemu-block@nongnu.org > On Mon, Aug 03, 2015 at 11:52:37AM +0200, Paolo Bonzini wrote: > > Since sheepdog does not implement a rebind callback, this back pointer > > is dangerous. Do not use it. > > > > Signed-off-by: Paolo Bonzini > > --- > > block/sheepdog.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/block/sheepdog.c b/block/sheepdog.c > > index 9585beb..68f1a0d 100644 > > --- a/block/sheepdog.c > > +++ b/block/sheepdog.c > > @@ -346,7 +346,6 @@ struct SheepdogAIOCB { > > }; > > > > typedef struct BDRVSheepdogState { > > - BlockDriverState *bs; > > AioContext *aio_context; > > > > SheepdogInode inode; > > @@ -738,7 +737,7 @@ static coroutine_fn void reconnect_to_sdog(void > > *opaque) > > if (s->fd < 0) { > > DPRINTF("Wait for connection to be established\n"); > > error_report_err(local_err); > > - co_aio_sleep_ns(bdrv_get_aio_context(s->bs), > > QEMU_CLOCK_REALTIME, > > + co_aio_sleep_ns(s->aio_context, QEMU_CLOCK_REALTIME, > > 1000000000ULL); > > } > > }; > > @@ -1392,7 +1391,6 @@ static int sd_open(BlockDriverState *bs, QDict > > *options, int flags, > > Error *local_err = NULL; > > const char *filename; > > > > - s->bs = bs; > > s->aio_context = bdrv_get_aio_context(bs); > > > > opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); > > -- > > 2.4.3 > > Is this intended for 2.4? No, I don't think so. Paolo