diff options
| author | Stefan Hajnoczi | 2018-03-06 21:48:18 +0100 |
|---|---|---|
| committer | Eric Blake | 2018-03-13 21:38:55 +0100 |
| commit | d03654eacdf35f436fbe78ca46cea215d5165ab5 (patch) | |
| tree | 0641a1398fb1b43f9a2e54fbbef07d6080d56568 /exec.c | |
| parent | nbd/server: Honor FUA request on NBD_CMD_TRIM (diff) | |
| download | qemu-d03654eacdf35f436fbe78ca46cea215d5165ab5.tar.gz qemu-d03654eacdf35f436fbe78ca46cea215d5165ab5.tar.xz qemu-d03654eacdf35f436fbe78ca46cea215d5165ab5.zip | |
block: let blk_add/remove_aio_context_notifier() tolerate BDS changes
Commit 2019ba0a0197 ("block: Add AioContextNotifier functions to BB")
added blk_add/remove_aio_context_notifier() and implemented them by
passing through the bdrv_*() equivalent.
This doesn't work across bdrv_append(), which detaches child->bs and
re-attaches it to a new BlockDriverState. When
blk_remove_aio_context_notifier() is called we will access the new BDS
instead of the one where the notifier was added!
>From the point of view of the blk_*() API user, changes to the root BDS
should be transparent.
This patch maintains a list of AioContext notifiers in BlockBackend and
adds/removes them from the BlockDriverState as needed.
Reported-by: Stefano Panella <spanella@gmail.com>
Cc: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20180306204819.11266-2-stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'exec.c')
0 files changed, 0 insertions, 0 deletions
