[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.10 4/4] block: Update open_flags after ->i
From: |
Stefan Hajnoczi |
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 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Wed, Aug 23, 2017 at 09:42:42PM +0800, Fam Zheng wrote:
> From: Stefan Hajnoczi <address@hidden>
>
> 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 <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
- Re: [Qemu-devel] [PATCH for-2.10 3/4] block-backend: Defer shared_perm tightening migration completion, (continued)
- [Qemu-devel] [PATCH for-2.10 3/4] mirror: Mark target BB as "force allow inactivate", Fam Zheng, 2017/08/23
- [Qemu-devel] [PATCH for-2.10 4/4] block: Update open_flags after ->inactivate() callback, Fam Zheng, 2017/08/23
- Re: [Qemu-devel] [PATCH for-2.10 4/4] block: Update open_flags after ->inactivate() callback,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration, Stefan Hajnoczi, 2017/08/23
- Re: [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration, Dr. David Alan Gilbert, 2017/08/23
- Re: [Qemu-devel] [PATCH for-2.10 0/4] block: Fix non-shared storage migration, Eric Blake, 2017/08/23