On 19.06.2014 05:58, Stefan Hajnoczi wrote:
On Wed, Jun 18, 2014 at 09:06:41PM +0200, Max Reitz wrote:
+static void nbd_update_can_read(NBDClient *client)
+{
+    bool can_read = client->recv_coroutine ||
+                    client->nb_requests < MAX_NBD_REQUESTS;
+
+    if (can_read != client->can_read) {
+        client->can_read = can_read;
+        nbd_set_handlers(client);
+
+        /* If we got here, nb_requests had to be MAX_NBD_REQUESTS before */
+        if (client->nb_requests < MAX_NBD_REQUESTS) {
+            aio_notify(client->exp->ctx);
+        }
nbd_set_handlers() indirectly invokes aio_notify(client->exp->ctx) via
aio_set_fd_handler().  This if statement is redundant.

Thanks for spotting this, I'll drop it in v3.

Max

Reply via email to