Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2022-01-21 Thread Emanuele Giuseppe Esposito
On 20/01/2022 14:48, Kevin Wolf wrote: Am 20.01.2022 um 14:22 hat Paolo Bonzini geschrieben: On 1/19/22 19:34, Kevin Wolf wrote: So if we go back to a bdrv_invalidate_cache() that does all the graph manipulations (and asserts that we're in the main loop) and then have a much smaller bdrv_co_

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2022-01-20 Thread Kevin Wolf
Am 20.01.2022 um 14:22 hat Paolo Bonzini geschrieben: > On 1/19/22 19:34, Kevin Wolf wrote: > > So if we go back to a bdrv_invalidate_cache() that does all the graph > > manipulations (and asserts that we're in the main loop) and then have a > > much smaller bdrv_co_invalidate_cache() that basicall

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2022-01-20 Thread Paolo Bonzini
On 1/19/22 19:34, Kevin Wolf wrote: So if we go back to a bdrv_invalidate_cache() that does all the graph manipulations (and asserts that we're in the main loop) and then have a much smaller bdrv_co_invalidate_cache() that basically just calls into the driver, would that solve the problem? I wa

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2022-01-19 Thread Kevin Wolf
Am 20.12.2021 um 13:20 hat Emanuele Giuseppe Esposito geschrieben: > > > On 17/12/2021 17:38, Emanuele Giuseppe Esposito wrote: > > > > > > On 17/12/2021 12:04, Hanna Reitz wrote: > > > On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: > > > > bdrv_co_invalidate_cache is special: it is an I/

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2022-01-19 Thread Hanna Reitz
On 19.01.22 16:57, Hanna Reitz wrote: On 23.12.21 18:11, Hanna Reitz wrote: On 20.12.21 13:20, Emanuele Giuseppe Esposito wrote: On 17/12/2021 17:38, Emanuele Giuseppe Esposito wrote: On 17/12/2021 12:04, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_inv

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2022-01-19 Thread Hanna Reitz
On 23.12.21 18:11, Hanna Reitz wrote: On 20.12.21 13:20, Emanuele Giuseppe Esposito wrote: On 17/12/2021 17:38, Emanuele Giuseppe Esposito wrote: On 17/12/2021 12:04, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-12-23 Thread Hanna Reitz
On 20.12.21 13:20, Emanuele Giuseppe Esposito wrote: On 17/12/2021 17:38, Emanuele Giuseppe Esposito wrote: On 17/12/2021 12:04, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O function, I still don’t believe it is

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-12-20 Thread Emanuele Giuseppe Esposito
On 17/12/2021 17:38, Emanuele Giuseppe Esposito wrote: On 17/12/2021 12:04, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O function, I still don’t believe it is, but well. (Yes, it is called by a test in an iothr

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-12-17 Thread Emanuele Giuseppe Esposito
On 17/12/2021 12:04, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O function, I still don’t believe it is, but well. (Yes, it is called by a test in an iothread, but I believe we’ve seen that the tests simply somet

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-12-17 Thread Hanna Reitz
On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O function, I still don’t believe it is, but well. (Yes, it is called by a test in an iothread, but I believe we’ve seen that the tests simply sometimes test things that shouldn’t be allowed.)

[PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-11-23 Thread Emanuele Giuseppe Esposito
bdrv_co_invalidate_cache is special: it is an I/O function, but uses the block layer permission API, which is GS. Because of this, we can assert that either the function is being called with BQL held, and thus can use the permission API, or make sure that the permission API is not used, by ensurin