All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit.canet@nodalink.com>
To: Fam Zheng <famz@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	jcody@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org,
	"Benoît Canet" <benoit.canet@nodalink.com>
Subject: Re: [Qemu-devel] [PATCH] block: Make op blockers recursive
Date: Mon, 22 Sep 2014 12:33:30 +0000	[thread overview]
Message-ID: <20140922123330.GE20345@nodalink.com> (raw)
In-Reply-To: <20140918025748.GA23325@fam-t430.nay.redhat.com>

On Thu, Sep 18, 2014 at 10:57:48AM +0800, Fam Zheng wrote:
> > > > 
> > > > BLOCK_OP_TYPE_MIRROR_REPLACE is checked and blocked by block-job-complete
> > > > during the time the mirror finish when an arbitrary node of the graph must be
> > > > replaced.
> > > 
> > > It seems to me mirror unblocks this operation from the job->blocker when job
> > > starts, and never block it (with the job->blocker) again. It's leaked.
> > > 
> > 
> > block-job-complete will block it in mirror_complete.
> > 
> > BLOCK_OP_TYPE_MIRROR_REPLACE is blocked by driver-mirror code triggered by
> > block-job complete to block the "replaces" BDS during the end of the mirroring.
> > 
> > If you find silly that block-job-complete prevent itself from running twice on
> > the same BDS by checking the blocker then blocking it then the existing code is
> > wrong.
> > 
> > Else the code in this current patch is correct.
> > 
> > Could you have a glance at "static void mirror_complete(BlockJob *job, Error **errp)"
> > and tell me what you think about the situation. You should also look at
> > check_to_replace_node.
> > 
> 
> I'd prefer early error from user's point of view, so maybe checking and
> blocking can be done during mirror_start instead, then we don't need the
> relaxation. What's the advantage to delay the check to block-job-complete?
> 
> Fam

BLOCK_OP_TYPE_MIRROR_REPLACE is the blocker for the replacement work so I blocked
it where the replacement happen.
Another point is that until block-job-complete happen we are not completely sure
that this replacement operation will happen.

Best regards

Benoît

      reply	other threads:[~2014-09-22 12:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22 16:11 [Qemu-devel] [PATCH] Implement recursive op blockers Benoît Canet
2014-08-22 16:11 ` [Qemu-devel] [PATCH] block: Make op blockers recursive Benoît Canet
2014-08-25  6:04   ` Fam Zheng
2014-08-25  9:06     ` Benoît Canet
2014-08-25  9:37       ` Fam Zheng
2014-08-25 12:12         ` Benoît Canet
2014-08-26  4:42           ` Fam Zheng
2014-08-26  6:45             ` Benoît Canet
2014-09-04 20:42               ` Stefan Hajnoczi
2014-09-10  8:54                 ` Fam Zheng
2014-09-10 14:18                   ` Benoît Canet
2014-09-10 15:14                   ` Eric Blake
2014-09-10 15:49                     ` Benoît Canet
2014-09-11 11:22                       ` Kevin Wolf
2014-09-11  0:50                     ` Fam Zheng
2014-09-09 11:56   ` Kevin Wolf
2014-09-09 14:28     ` Benoît Canet
2014-09-12  3:48       ` Fam Zheng
2014-09-15 15:17         ` Benoît Canet
2014-09-18  2:57           ` Fam Zheng
2014-09-22 12:33             ` Benoît Canet [this message]

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=20140922123330.GE20345@nodalink.com \
    --to=benoit.canet@nodalink.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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.