All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path
Date: Wed, 20 Jul 2011 13:34:50 -0300	[thread overview]
Message-ID: <20110720163450.GA17333@amt.cnet> (raw)
In-Reply-To: <4E25FBA6.3060803@web.de>

On Tue, Jul 19, 2011 at 11:48:22PM +0200, Jan Kiszka wrote:
> On 2011-07-19 13:46, Michael Tokarev wrote:
> > If we do, it results in double monitor_resume() (second being called
> > from migrate_fd_cleanup() anyway) and monitor suspend count becoming
> > negative.
> > 
> > Cc'ing people from `git blame' list for the lines in question: the
> > change fixes the problem but I'm not sure what the original intention
> > of this code was in this place.  Unfortunately noone replied to two
> > my attempts to raise this issue.
> > 
> > Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
> > ---
> >  migration.c |    3 ---
> >  1 files changed, 0 insertions(+), 3 deletions(-)
> > 
> > diff --git a/migration.c b/migration.c
> > index af3a1f2..115588c 100644
> > --- a/migration.c
> > +++ b/migration.c
> > @@ -330,9 +330,6 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
> >      if (ret == -EAGAIN) {
> >          qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s);
> >      } else if (ret < 0) {
> > -        if (s->mon) {
> > -            monitor_resume(s->mon);
> > -        }
> >          s->state = MIG_STATE_ERROR;
> >          notifier_list_notify(&migration_state_notifiers);
> >      }
> 
> Looks reasonable to me, but Marcelo should comment on this, specifically
> which scenario once required the resume.
> 
> Jan

If the monitor was suspended (migrate without -d), then this path must
resume. Should record that somewhere and check here.

  reply	other threads:[~2011-07-20 16:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 11:46 [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path Michael Tokarev
2011-07-19 21:48 ` Jan Kiszka
2011-07-20 16:34   ` Marcelo Tosatti [this message]
2011-07-20 22:06     ` Jan Kiszka
2011-08-03  7:38       ` Michael Tokarev
2011-08-03 13:22         ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2011-08-03 14:51 Michael Tokarev
2011-08-04 19:24 ` Luiz Capitulino
2011-08-04 19:52   ` Michael Tokarev
2011-08-04 20:00     ` Michael Tokarev
2011-08-04 22:19       ` Jan Kiszka
2011-08-05  6:51         ` Michael Tokarev
2011-08-05  7:11           ` Jan Kiszka

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=20110720163450.GA17333@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=mjt@tls.msk.ru \
    --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.