Am 04.09.19 um 11:34 schrieb Kevin Wolf:
Am 03.09.2019 um 21:52 hat Peter Lieven geschrieben:

Am 03.09.2019 um 16:56 schrieb Kevin Wolf <kw...@redhat.com>:

Am 03.09.2019 um 15:44 hat Peter Lieven geschrieben:
libnfs recently added support for unmounting. Add support
in Qemu too.

Signed-off-by: Peter Lieven <p...@kamp.de>
Looks trivial enough to review even for me. :-)

Thanks, applied to the block branch.

Kevin
I am not sure what the reason is, but with this patch I sometimes run
into nfs_process_read being called for a cdrom mounted from nfs after
I ejected it (and the whole nfs client context is already destroyed).
Does this mean that nfs_umount() gets some response, but we don't
properly wait for it? Or is some older request still in flight?


nfs_umount itself is a sync call and should only terminate when

the call is done. But there is an independent I/O handler in that

function polling on the fd. (wait_for_nfs_reply in libnfs-sync.c).

This is why I thought the right solution is to stop the Qemu I/O handler

before calling nfs_close and nfs_umount. nfs_close also uses this

sync I/O handler, but for some reason it seems not to make trouble.


The other solution would be to use the async versions of close and umount,

but that would make the code in Qemu more complex.


Peter



Reply via email to