qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH] usb-msd: Add usb-storage, removable=on|off


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] Re: [PATCH] usb-msd: Add usb-storage, removable=on|off property
Date: Mon, 17 Jan 2011 10:04:05 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Jan 17, 2011 at 10:21:26AM +0100, Christoph Hellwig wrote:
> The actual removable bit looks fine, but I don't think the connection of
> the change callback looks sane.  What's the rationale for it?

Since we're using bdrv_set_removable(), the user may try to eject the
block device from the QEMU monitor.  At that point we have a closed
BlockDriverState and all operations will (at best) error since there is
no medium.

The callback removes the USB MSD so that eject is equivalent to removing
the device.  It's a hack and we could remove it, but then we're left
with a weird guest-visible state that you can't get into with a physical
USB thumbdrive.

I was considering not using bdrv_set_removable() and instead adding a
hint to the BlockDriverState which gets checked when constructing the
SCSI INQUIRY response.  If we take that approach, then QEMU doesn't
consider the block device removable in the eject/change medium sense.

Stefan



reply via email to

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