]> git.proxmox.com Git - mirror_qemu.git/commit
block: bdrv_set_backing_hd(): use drained section
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 24 Jan 2022 17:37:41 +0000 (18:37 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 1 Feb 2022 12:49:15 +0000 (13:49 +0100)
commitc0829cb1fd5e0b35abfcf9fc3f04502c1ed5d7b6
tree87d28ba2f30d03d68f22b420bfaaf261690fdb7a
parente66e665f15736f5ee1fbd8087926cb0f1e52f61a
block: bdrv_set_backing_hd(): use drained section

Graph modifications should be done in drained section. stream_prepare()
handler of block stream job call bdrv_set_backing_hd() without using
drained section and it's theoretically possible that some IO request
will interleave with graph modification and will use outdated pointers
to removed block nodes.

Some other callers use bdrv_set_backing_hd() not caring about drained
sections too. So it seems good to make a drained section exactly in
bdrv_set_backing_hd().

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20220124173741.2984056-1-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c