qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/3] block: Correct size across CD-ROM media change


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PATCH 0/3] block: Correct size across CD-ROM media change
Date: Wed, 23 Mar 2011 17:40:52 +0000

This patch series fixes two Linux host CD-ROM pass-through bugs in QEMU.

After applying these patches it is possible to pass-through a Linux host CD-ROM
completely.  The guest can eject from software or the physical eject button can
be pressed on the drive.  The guest can detect this and newly inserted media
are noticed.  There is no need to issue any QEMU monitor 'eject' or 'change'
commands because the host CD-ROM is completely "passed through".

Patch details:

The first is that the device size is cached even for removable devices and we
never update it.  If a host CD-ROM is changed, then the size will be stale and
reflect that of the last medium.

The second is that Linux host CD-ROM pass-through requires that we re-open the
device to refresh its size.  This is because the Linux CD-ROM driver only
refreshes the size when the device is opened and furthermore has a bug that
leads to stale sizes if the file descriptor is held across media change.

I have also included a trace event for bdrv_set_locked() because it is useful
information when debugging issues like these in the future.




reply via email to

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