Re: [PATCH 16/24] block: Mark bdrv_replace_node() GRAPH_WRLOCK

2023-11-03 Thread Eric Blake
On Fri, Nov 03, 2023 at 11:32:39AM +0100, Kevin Wolf wrote: ... > > > -GLOBAL_STATE_CODE(); > > > - > > > -/* Make sure that @from doesn't go away until we have successfully > > > attached > > > - * all of its parents to @to. */ > > > > Useful comment that you just moved here in the p

Re: [PATCH 16/24] block: Mark bdrv_replace_node() GRAPH_WRLOCK

2023-11-03 Thread Kevin Wolf
Am 27.10.2023 um 23:33 hat Eric Blake geschrieben: > On Fri, Oct 27, 2023 at 05:53:25PM +0200, Kevin Wolf wrote: > > Instead of taking the writer lock internally, require callers to already > > hold it when calling bdrv_replace_node(). Its callers may already want > > to hold the graph lock and so

Re: [PATCH 16/24] block: Mark bdrv_replace_node() GRAPH_WRLOCK

2023-10-27 Thread Eric Blake
On Fri, Oct 27, 2023 at 05:53:25PM +0200, Kevin Wolf wrote: > Instead of taking the writer lock internally, require callers to already > hold it when calling bdrv_replace_node(). Its callers may already want > to hold the graph lock and so wouldn't be able to call functions that > take it internall

[PATCH 16/24] block: Mark bdrv_replace_node() GRAPH_WRLOCK

2023-10-27 Thread Kevin Wolf
Instead of taking the writer lock internally, require callers to already hold it when calling bdrv_replace_node(). Its callers may already want to hold the graph lock and so wouldn't be able to call functions that take it internally. Signed-off-by: Kevin Wolf --- include/block/block-global-state