qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] usbredir: Do not detach usb if backend chardev disconnect


From: Gerd Hoffmann
Subject: Re: [PATCH] usbredir: Do not detach usb if backend chardev disconnect
Date: Mon, 2 Jan 2023 11:43:21 +0100

On Thu, Dec 22, 2022 at 09:21:25PM +0800, Minglei Liu wrote:
> ping !
> please review this patch : [PATCH] usbredir: Do not detach usb if backend
> chardev disconnect - minglei.liu (kernel.org)
> <https://lore.kernel.org/qemu-devel/20221109115619.696826-1-minglei.liu@smartx.com/>
> 
> minglei.liu <minglei.liu@smartx.com> 于2022年11月9日周三 19:56写道:
> 
> > If the network between qemu and usbredirserver is temporarily disconnected,
> > the USB device in the VM will be unplugged. If the reconnect parameter is
> > configured for the backend chardev, the device will be reconnected later.
> > But from the inside of the VM, this USB device has experienced unplug and
> > re-plug, if the USB storage device has been mounted in the VM before,
> > the drive letter will change after the device is re-plugged.
> >
> > So in this case, we no longer unplug the device, and operations to the USB
> > is returned immediately at this point.

If you are lucky, and it also depends on the kind of device.

I don't think this is a safe thing to do in general.  You just don't
know what state the usb device is in when you are re-connecting, and
you also don't know whenever a re-connect will ever happen.

take care,
  Gerd




reply via email to

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