提交 dd65a52e 编写于 作者: K Kevin Wolf

block: Fix pending requests check in bdrv_append()

bdrv_append() cares about isolation of the node that it modifies, but
not about activity in some subtree below it. Instead of using the
recursive bdrv_requests_pending(), directly check bs->in_flight, which
considers only the node in question.
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NMax Reitz <mreitz@redhat.com>
Acked-by: NFam Zheng <famz@redhat.com>
上级 4e9e4323
......@@ -2897,8 +2897,8 @@ static void change_parent_backing_link(BlockDriverState *from,
*/
void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top)
{
assert(!bdrv_requests_pending(bs_top));
assert(!bdrv_requests_pending(bs_new));
assert(!atomic_read(&bs_top->in_flight));
assert(!atomic_read(&bs_new->in_flight));
bdrv_ref(bs_top);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册