qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up


From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up
Date: Tue, 21 Oct 2008 09:57:50 -0500
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Avi Kivity wrote:
Avi Kivity wrote:
Anthony Liguori wrote:
For reasons that I do not fully understand, bdrv_aio_read() does
not return immediately, but instead it calls scsi_read_data()
recursively.
This bothers me.  bdrv_aio_read() should never immediately invoke the
callback to prevent exactly this sort of problem.  Perhaps this was a
bug that has since been fixed?  Is this still reproducible?

qcow2 metadata is synchronous, and if the disk is empty, there will be
no data I/O, so bdrv_aio_read() will never be invoked.

Maybe we should fix this in qcow2 (and the other block formats) by
scheduling a BH.

FWIW, I was told this reproduces on kvm-77 (which has the latest qemu scsi bits).

qemu_aio_wait() will run bottom halves when emulating synchronous IO. I don't think this is exploitable practically speaking but it seems to me like a major flaw. I think the proper fix is what you describe, modifying qcow2 to schedule a bottom half to read metadata. Better yet, a full conversion to make the meta data reading/writing asynchronous.

Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]