qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend.
Date: Wed, 26 Sep 2012 12:08:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

Il 26/09/2012 12:00, Kevin Wolf ha scritto:
>> > +
>> > +        ret = write(fd, (void *)&acb, sizeof(acb));
>> > +        if (ret >= 0) {
>> > +            break;
>> > +        }
>> > +        if (errno == EINTR) {
>> > +            continue;
>> > +        }
>> > +        if (errno != EAGAIN) {
>> > +            break;
>> > +        }
> Variatio delectat? ;-)
> 
> How about just do { ... } while (errno == EINTR || errno == EAGAIN); ?

That should be

while ((ret < 0) && (errno == EINTR || errno == EAGAIN));

However, fd here is blocking, so you can just use qemu_write_full.

Paolo




reply via email to

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