[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 02/12] nbd: Mark fd handlers client type as "exte
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v2 02/12] nbd: Mark fd handlers client type as "external" |
Date: |
Mon, 12 Oct 2015 19:50:41 +0800 |
So we could distinguish it from internal used fds, thus avoid handling
unwanted events in nested aio polls.
Signed-off-by: Fam Zheng <address@hidden>
---
nbd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nbd.c b/nbd.c
index 32a1f66..b599e62 100644
--- a/nbd.c
+++ b/nbd.c
@@ -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);
}
}
--
2.6.1
[Qemu-devel] [PATCH v2 06/12] block: Add "drained begin/end" for transactional external snapshot, Fam Zheng, 2015/10/12
[Qemu-devel] [PATCH v2 08/12] block: Add "drained begin/end" for transactional blockdev-backup, Fam Zheng, 2015/10/12