* [Qemu-devel] Open by references and close on exit
@ 2014-02-12 17:16 Benoît Canet
2014-02-13 18:05 ` Max Reitz
0 siblings, 1 reply; 2+ messages in thread
From: Benoît Canet @ 2014-02-12 17:16 UTC (permalink / raw)
To: qemu-devel; +Cc: mreitz
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Open by references and close on exit
2014-02-12 17:16 [Qemu-devel] Open by references and close on exit Benoît Canet
@ 2014-02-13 18:05 ` Max Reitz
0 siblings, 0 replies; 2+ messages in thread
From: Max Reitz @ 2014-02-13 18:05 UTC (permalink / raw)
To: Benoît Canet; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-13 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-12 17:16 [Qemu-devel] Open by references and close on exit Benoît Canet
2014-02-13 18:05 ` Max Reitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).