All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jeff Cody <jcody@redhat.com>
Cc: mitake hitoshi <mitake.hitoshi@lab.ntt.co.jp>,
	namei unix <namei.unix@gmail.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sheepdog: remove back pointer to BlockDriverState
Date: Mon, 3 Aug 2015 08:44:10 -0400 (EDT)	[thread overview]
Message-ID: <1326598126.5100353.1438605850889.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150803124049.GA9878@localhost.localdomain>

> 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 <pbonzini@redhat.com>
> > ---
> >  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

  reply	other threads:[~2015-08-03 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03  9:52 [Qemu-devel] [PATCH] sheepdog: remove back pointer to BlockDriverState Paolo Bonzini
2015-08-03 12:40 ` Jeff Cody
2015-08-03 12:44   ` Paolo Bonzini [this message]
2015-08-03 12:48 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1326598126.5100353.1438605850889.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jcody@redhat.com \
    --cc=mitake.hitoshi@lab.ntt.co.jp \
    --cc=namei.unix@gmail.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.