Open by references and close on exit
Hi Max,
I have a crash when quorum open it's files by references and close them on exit:
It seems that bdrv_close_all tries to close them a second time because they are still registered in bdrv_states.
Do you think you have the same problem with blkverify ?
Should bdrv_open remove the bs from bdrv_states when opening by reference in an additional patch ?
Best regards
Benoît
Hi Benoît,
Hm, opening a reference should only result in the refcount of the respective BDS being incremented through bdrv_ref(). Since no new BDS is created, nothing should be added to bdrv_states. When the BDS “closed” through bdrv_unref(), it is only actually closed/deleted if the refcount reaches zero. Until then, it remains in bdrv_states so it can be referenced (since it has not been closed) and closed through bdrv_close_all().
I don't really see how bdrv_close_all() closes the BDS “a second time” – bdrv_unref() should only close the BDS if its refcount reaches zero. And if that's the case, it should be removed from bdrv_states anyway.
Kind regards,
Max