block: Take graph rdlock in parts of reopen
commitce433d2942b78d38d31bdb7845dbf565c9dc1109
authorKevin Wolf <kwolf@redhat.com>
Fri, 29 Sep 2023 14:51:43 +0000 (29 16:51 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 Oct 2023 14:31:33 +0000 (12 16:31 +0200)
tree07ea69f416e58ff03cba02a27a7765f296070745
parenta32e781838e7231f2239bde0ac2f105dc7072abb
block: Take graph rdlock in parts of reopen

Reopen isn't easy with respect to locking because many of its functions
need to iterate the graph, some change it, and then you get some drains
in the middle where you can't hold any locks.

Therefore just documents most of the functions to be unlocked, and take
locks internally before accessing the graph.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230929145157.45443-9-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
include/block/block_int-common.h