[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 10/14] nbd: Less allocation during NBD_OPT_LI
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v4 10/14] nbd: Less allocation during NBD_OPT_LIST |
Date: |
Mon, 27 Jun 2016 14:16:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
On 26/06/2016 00:15, Eric Blake wrote:
> +/* Return -1 if unrecoverable error occurs
> , 0 if NBD_OPT_LIST is unsupported,
These two should return errp != NULL and negative errno.
> 1 if iteration is done
> 2 to keep looking,
> and 3 if * this entry matches @want. */
These three should return errp == NULL. Please change the function so
that the return value signifies "need another call", and a bool*
argument is set to true if the name matches.
Paolo
> +static int nbd_receive_list(QIOChannel *ioc, const char *want, Error **errp)
- [Qemu-devel] [PATCH v4 06/14] nbd: Send message along with server NBD_REP_ERR errors, (continued)
- [Qemu-devel] [PATCH v4 06/14] nbd: Send message along with server NBD_REP_ERR errors, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 11/14] nbd: Support shorter handshake, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 04/14] nbd: Treat flags vs. command type as separate fields, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 14/14] nbd: Implement NBD_CMD_WRITE_ZEROES on client, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 07/14] nbd: Share common option-sending code in client, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 05/14] nbd: Share common reply-sending code in server, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 08/14] nbd: Let server know when client gives up negotiation, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 10/14] nbd: Less allocation during NBD_OPT_LIST, Eric Blake, 2016/06/25
- Re: [Qemu-devel] [PATCH v4 10/14] nbd: Less allocation during NBD_OPT_LIST,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v4 02/14] nbd: Add qemu-nbd -D for human-readable description, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 13/14] nbd: Implement NBD_CMD_WRITE_ZEROES on server, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 03/14] nbd: Limit nbdflags to 16 bits, Eric Blake, 2016/06/25
- [Qemu-devel] [PATCH v4 12/14] nbd: Improve server handling of shutdown requests, Eric Blake, 2016/06/25