qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.10 4/4] block: Update open_flags after ->inactivate() callback
Date: Wed, 23 Aug 2017 15:11:55 +0100	[thread overview]
Message-ID: <20170823141155.GA16760@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170823134242.12080-5-famz@redhat.com>

On Wed, Aug 23, 2017 at 09:42:42PM +0800, Fam Zheng wrote:
> From: Stefan Hajnoczi <stefanha@redhat.com>
> 
> In the ->inactivate() callbacks, permissions are updated, which
> typically involves a recursive check of the whole graph. Setting
> BDRV_O_INACTIVE right before doing that creates a state that
> bdrv_is_writable() returns false, which causes permission update
> failure.
> 
> Reorder them so the flag is updated after calling the function. Note
> that this doesn't break the assert in bdrv_child_cb_inactivate() because
> for any specific BDS, we still update its flags first before calling
> ->inactivate() on it one level deeper in the recursion.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

  reply	other threads:[~2017-08-23 14:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 13:42 [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration Fam Zheng
2017-08-23 13:42 ` [Qemu-devel] [PATCH for-2.10 1/4] block-backend: Refactor inactivate check Fam Zheng
2017-08-23 14:33   ` Eric Blake
2017-08-23 13:42 ` [Qemu-devel] [PATCH for-2.10 2/4] block-backend: Allow more "can inactivate" cases Fam Zheng
2017-08-23 14:36   ` Eric Blake
2017-08-23 14:47     ` Fam Zheng
2017-08-23 14:57       ` Eric Blake
2017-08-23 13:42 ` [Qemu-devel] [PATCH for-2.10 3/4] mirror: Mark target BB as "force allow inactivate" Fam Zheng
2017-08-23 13:42 ` [Qemu-devel] [PATCH for-2.10 4/4] block: Update open_flags after ->inactivate() callback Fam Zheng
2017-08-23 14:11   ` Stefan Hajnoczi [this message]
2017-08-23 14:12 ` [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration Stefan Hajnoczi
2017-08-23 14:29 ` Dr. David Alan Gilbert
2017-08-23 14:41   ` Eric Blake
2017-08-23 14:46 ` Eric Blake

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=20170823141155.GA16760@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).