[Spice-devel] [spice-gtk v4 12/13] cd-sharing: implementation of new USB widget

Gerd Hoffmann kraxel at redhat.com
Fri Sep 21 08:05:15 UTC 2018


  Hi,

> >> Ok, let say I am biased, and I have opinions because I would use it
> >> and this is stuff I am also maintaining:
> >>
> >> - I have never used a pluggable CD drive.
> >> - I have never used mulitple CD drive simultaneously.
> >
> > This is common case when you install Windows VM with virtio kind of hard drive
> > Typically you load 2 ISOs (OS and guest tools)
> 
> Not needed simultaneously.

But it is more convinient to just have two cdrom drives for that.

> >> > Drive lock. When CD is reqired for SW operation, the SW often locks
> >> > the drive preventing user-initiated eject. In such case, if needed, the CD still can be
> >> > manually ejected using clip. Another option related to 'lock' is that user may want
> >> > to prevent removal of CD by guest software and lock it on client side.
> >>
> >> - I have never used locking either.
> >
> > You did not, of couse. This is software-driven operation, SW does it by sending ioctls.
> 
> So let say I have never had to know whether a device was locked. If I
> eject it and it can't, I expect an error to show up somehow.

It actually is locked.  Usually you will not notice though.  In case the
driver is locked and the user presses the eject button the cdrom drive
sends a notification to the OS, which will then try to umount the media
and eject it when done.  So the eject button appears to just eject the
cdrom, but there is more happening behind the scenes.

I think expecting the users to know about the door locking is the wrong
way to go.  Just handle the lock/unlock/eject requets from the guest.
Maybe provide a virtual "eject" button for the drive.

cheers,
  Gerd



More information about the Spice-devel mailing list