diff options
author | Fam Zheng <famz@redhat.com> | 2015-10-23 11:08:06 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-10-23 18:18:23 +0200 |
commit | 172cc129a5ae58d36feb51f97fd67e2161ae5cc6 (patch) | |
tree | e11c5556ecd98cc80898d907615fdd133c64a3ad /nbd.c | |
parent | dca21ef23ba48f6f1428c59f295a857e5dc203c8 (diff) | |
download | qemu-172cc129a5ae58d36feb51f97fd67e2161ae5cc6.tar.gz qemu-172cc129a5ae58d36feb51f97fd67e2161ae5cc6.tar.bz2 qemu-172cc129a5ae58d36feb51f97fd67e2161ae5cc6.zip |
nbd: Mark fd handlers client type as "external"
So we could distinguish it from internal used fds, thus avoid handling
unwanted events in nested aio polls.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'nbd.c')
-rw-r--r-- | nbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1446,7 +1446,7 @@ static void nbd_set_handlers(NBDClient *client) { if (client->exp && client->exp->ctx) { aio_set_fd_handler(client->exp->ctx, client->sock, - false, + true, client->can_read ? nbd_read : NULL, client->send_coroutine ? nbd_restart_write : NULL, client); @@ -1457,7 +1457,7 @@ static void nbd_unset_handlers(NBDClient *client) { if (client->exp && client->exp->ctx) { aio_set_fd_handler(client->exp->ctx, client->sock, - false, NULL, NULL, NULL); + true, NULL, NULL, NULL); } } |