Re: [PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-09-06 Thread Kevin Wolf
Am 05.09.2023 um 18:39 hat Kevin Wolf geschrieben: > Am 22.08.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > > On Thu, Aug 17, 2023 at 02:50:04PM +0200, Kevin Wolf wrote: > > > bdrv_unref() is called by a lot of places that need to hold the graph > > > lock (it naturally happens in the context

Re: [PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-09-05 Thread Kevin Wolf
Am 22.08.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > On Thu, Aug 17, 2023 at 02:50:04PM +0200, Kevin Wolf wrote: > > bdrv_unref() is called by a lot of places that need to hold the graph > > lock (it naturally happens in the context of operations that change the > > graph). However,

Re: [PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-08-22 Thread Stefan Hajnoczi
On Thu, Aug 17, 2023 at 02:50:04PM +0200, Kevin Wolf wrote: > bdrv_unref() is called by a lot of places that need to hold the graph > lock (it naturally happens in the context of operations that change the > graph). However, bdrv_unref() takes the graph writer lock internally, so > it can't

Re: [PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-08-21 Thread Kevin Wolf
Am 18.08.2023 um 18:26 hat Eric Blake geschrieben: > On Fri, Aug 18, 2023 at 11:24:00AM -0500, Eric Blake wrote: > > > +++ b/block/graph-lock.c > > > @@ -163,17 +163,26 @@ void bdrv_graph_wrlock(BlockDriverState *bs) > > > void bdrv_graph_wrunlock(void) > > > { > > > GLOBAL_STATE_CODE(); >

Re: [PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-08-18 Thread Eric Blake
On Fri, Aug 18, 2023 at 11:24:00AM -0500, Eric Blake wrote: > > +++ b/block/graph-lock.c > > @@ -163,17 +163,26 @@ void bdrv_graph_wrlock(BlockDriverState *bs) > > void bdrv_graph_wrunlock(void) > > { > > GLOBAL_STATE_CODE(); > > -QEMU_LOCK_GUARD(_context_list_lock); > >

Re: [PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-08-18 Thread Eric Blake
On Thu, Aug 17, 2023 at 02:50:04PM +0200, Kevin Wolf wrote: > bdrv_unref() is called by a lot of places that need to hold the graph > lock (it naturally happens in the context of operations that change the > graph). However, bdrv_unref() takes the graph writer lock internally, so > it can't

[PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-08-17 Thread Kevin Wolf
bdrv_unref() is called by a lot of places that need to hold the graph lock (it naturally happens in the context of operations that change the graph). However, bdrv_unref() takes the graph writer lock internally, so it can't actually be called while already holding a graph lock without causing a