qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 5/7] block: Fix cross-AioContext blockdev-snapshot


From: Peter Krempa
Subject: Re: [PATCH v2 5/7] block: Fix cross-AioContext blockdev-snapshot
Date: Tue, 10 Mar 2020 14:27:13 +0100
User-agent: Mutt/1.13.3 (2020-01-12)

On Tue, Mar 10, 2020 at 12:38:29 +0100, Kevin Wolf wrote:
> external_snapshot_prepare() tries to move the overlay to the AioContext
> of the backing file (the snapshotted node). However, it's possible that
> this doesn't work, but the backing file can instead be moved to the
> overlay's AioContext (e.g. opening the backing chain for a mirror
> target).
> 
> bdrv_append() already indirectly uses bdrv_attach_node(), which takes
> care to move nodes to make sure they use the same AioContext and which
> tries both directions.
> 
> So the problem has a simple fix: Just delete the unnecessary extra
> bdrv_try_set_aio_context() call in external_snapshot_prepare() and
> instead assert in bdrv_append() that both nodes were indeed moved to the
> same AioContext.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  block.c    |  1 +
>  blockdev.c | 16 ----------------
>  2 files changed, 1 insertion(+), 16 deletions(-)

Tested-by: Peter Krempa <address@hidden>

Unfortunately I don't feel confident enough in the intricacies of the
aio contexts. Nevertheless Fixing bugs by deleting code is awesome!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]