[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes we
From: |
Amit Shah |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes |
Date: |
Tue, 6 Apr 2010 16:35:40 +0530 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On (Tue) Apr 06 2010 [12:21:52], Gerd Hoffmann wrote:
> On 04/06/10 11:58, Amit Shah wrote:
>>>> It would certainly be beneficial for consumers of virtio-serial to be
>>>> notified of -EAGAIN so that the guest can be throttled till the chardev
>>>> catches up with the data being sent.
>>>
>>> EAGAIN should only ever occur if no bytes are written.
>>
>> Right. That, or just return 0 and let the caller handle the situation?
>
> Go with the usual unix semantics instead of creating something new.
>
> When something was written -- return the number of bytes. Caller has to
> compare with the length passed in to figure whenever it was a partial
> write or not.
>
> When nothing was written -- return the error.
Unless Paul wants to never return recoverable error messages as he
mentioned in his first mail.
Amit
- [Qemu-devel] [PATCH 2/5] char: unix write: Add some sleep to ease off spinning in a tight loop, (continued)
Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Paul Brook, 2010/04/05
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Amit Shah, 2010/04/05
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Paul Brook, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Amit Shah, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes,
Amit Shah <=
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Jamie Lokier, 2010/04/06
[Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling, Gerd Hoffmann, 2010/04/06