diff options
author | Kevin Wolf <kwolf@redhat.com> | 2025-07-14 15:01:53 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2025-07-14 15:42:15 +0200 |
commit | 975d9ff32e37f67e82d0da546cfb567bdee9c6fb (patch) | |
tree | 88af138695a941ab8738053ee867265131b82343 /scripts | |
parent | 60f609c1526102df35d8de8f513a80e6d3528bd8 (diff) | |
download | qemu-975d9ff32e37f67e82d0da546cfb567bdee9c6fb.zip qemu-975d9ff32e37f67e82d0da546cfb567bdee9c6fb.tar.gz qemu-975d9ff32e37f67e82d0da546cfb567bdee9c6fb.tar.bz2 |
block: Allow bdrv_new() with and without graph lock
bdrv_new() calls bdrv_drained_begin(), which can poll and therefore
can't be called while holding the graph lock. One option to make sure
that this call is allowed would be marking bdrv_new() GRAPH_UNLOCKED.
However, this is actually an unnecessary restriction because we know
that we only just created the BlockDriverState and it isn't even part of
the graph yet. We can use bdrv_do_drained_begin_quiesce() instead to
avoid the polling, which means that bdrv_new() can now safely be called
from callers that hold the graph lock as well as from callers that
don't.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions