[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
- Re: [Qemu-block] [PATCH 07/10] io: add qio_channel_read/write_all, (continued)
- [Qemu-block] [PATCH 09/10] scsi: add multipath support to qemu-pr-helper, Paolo Bonzini, 2017/08/22
- [Qemu-block] [PATCH 08/10] scsi: build qemu-pr-helper, Paolo Bonzini, 2017/08/22
- [Qemu-block] [PATCH 01/10] scsi: rename scsi_convert_sense, Paolo Bonzini, 2017/08/22
- [Qemu-block] [PATCH 03/10] scsi: introduce scsi_build_sense, Paolo Bonzini, 2017/08/22
- [Qemu-block] [PATCH 04/10] scsi: introduce sg_io_sense_from_errno, Paolo Bonzini, 2017/08/22