Re: [PATCH 08/20] block: .bdrv_open is non-coroutine and unlocked

2023-05-01 Thread Stefan Hajnoczi
On Tue, Apr 25, 2023 at 07:31:46PM +0200, Kevin Wolf wrote: > Drivers were a bit confused about whether .bdrv_open can run in a > coroutine and whether or not it holds a graph lock. > > It cannot keep a graph lock from the caller across the whole function > because it both changes the graph (requi

Re: [PATCH 08/20] block: .bdrv_open is non-coroutine and unlocked

2023-04-25 Thread Eric Blake
On Tue, Apr 25, 2023 at 07:31:46PM +0200, Kevin Wolf wrote: > Drivers were a bit confused about whether .bdrv_open can run in a > coroutine and whether or not it holds a graph lock. > > It cannot keep a graph lock from the caller across the whole function > because it both changes the graph (requi

[PATCH 08/20] block: .bdrv_open is non-coroutine and unlocked

2023-04-25 Thread Kevin Wolf
Drivers were a bit confused about whether .bdrv_open can run in a coroutine and whether or not it holds a graph lock. It cannot keep a graph lock from the caller across the whole function because it both changes the graph (requires a writer lock) and does I/O (requires a reader lock). Therefore, i