qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] exec-migration: handle EINTR in popen_get_buff


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] exec-migration: handle EINTR in popen_get_buffer()
Date: Tue, 9 Jun 2009 17:51:02 +0300

On 6/9/09, Uri Lublin <address@hidden> wrote:
> On 06/08/2009 07:55 PM, Blue Swirl wrote:
>
> > On 6/8/09, Uri Lublin<address@hidden>  wrote:
> >
> > > Sometimes, upon interrupt, fread returns with no data, and
> > >  the (incoming exec) migration fails.
> > >
> > >  Fix by retrying on such a case.
> > >
> >
> > Maybe a better solution would be to introduce qemu_{f,}{read,write},
> > which handle EINTR and partial reads/writes.
> >
> >
> >
>
>  The migration code does not care about partial reads/writes (at this
> level). Data is read /written to/from a buffer. When needed/available we
> retry.
>
>  I can introduce qemu_{f,}{read,write} which only takes care of EINTR (by
> retrying) but the caller would have to handle partial reads/writes (and
> EAGAIN). Would that be helpful ?

Would we really need two functions, one with partial read/write and
EAGAIN handling and one with only EINTR? There's fread_targphys which
handles partial reads/writes, but not EINTR/EAGAIN, otherwise in many
{f]{read,write} use cases there is no handling for any of these.




reply via email to

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