qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH 08/10] scsi: build qemu-pr-helper


From: Paolo Bonzini
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 08/10] scsi: build qemu-pr-helper
Date: Tue, 22 Aug 2017 18:04:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 22/08/2017 16:34, Marc-André Lureau wrote:
> Could this be handled by udisk? It seems at first the problem is not
> specific to qemu.

Yes, possibly.  In practice, everybody else who uses persistent
reservations seems to run as root. :)

>> +static void usage(const char *name)
>> +{
>> +    (printf) (
> Why '(printf)' ? I noticed qemu-nbd use this too.
> 

It lets you use #ifdef inside the argument list.

>>
>> +        /* Stash one file descriptor per request.  */
>> +        if (nfds) {
>> +            for (i = 0; i < nfds; i++) {
>> +                if (client->fd == -1) {
>> +                    client->fd = fds[i++];
>> +                } else {
>> +                    close(fds[i]);
> 
> Isn't this a condition to close the client?

Yes, though I still have to go through the descriptors and close them.

Paolo



reply via email to

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