Re: [PATCH 7/7] virtio: console: Return -EPIPE if port on the host isn't connected

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

 



On 03/23/10 10:13, Amit Shah wrote:
>>> +	if (use_multiport(port->portdev)&&  !port->host_connected)
>>> +		return -EPIPE;
>>> +
>>
>> Hmm, do applications actually handle this error?
>
> Don't know; there aren't any apps yet that use this functionality too.

Looks sensible to me.

> However, some error has to be indicated to the app otherwise it's just
> messy if the app keeps writing and receiving EAGAIN; we just get a tight
> loop in this case.

With poll support done right (don't signal "writable" when not 
connected) this shouldn't be a issue.  Apps retrying over and over 
without waiting for the filehandle becoming writable are broken by design.

But apps can't disturgish between "ring full" and "host disconnected" 
then.  So think returning -EPIPE here isn't a bad choice.

cheers,
   Gerd
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux