qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ISCSI: Only set up the read-event if we are actuall


From: Ronnie Sahlberg
Subject: [Qemu-devel] [PATCH] ISCSI: Only set up the read-event if we are actually waiting for data to come back in from the target.
Date: Fri, 11 May 2012 20:22:02 +1000

Signed-off-by: Ronnie Sahlberg <address@hidden>
---
 block/iscsi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/block/iscsi.c b/block/iscsi.c
index d37c4ee..989b5e9 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -105,7 +105,9 @@ iscsi_set_events(IscsiLun *iscsilun)
 {
     struct iscsi_context *iscsi = iscsilun->iscsi;
 
-    qemu_aio_set_fd_handler(iscsi_get_fd(iscsi), iscsi_process_read,
+    qemu_aio_set_fd_handler(iscsi_get_fd(iscsi),
+                           (iscsi_queue_length(iscsi) > 0)
+                           ? iscsi_process_read : NULL,
                            (iscsi_which_events(iscsi) & POLLOUT)
                            ? iscsi_process_write : NULL,
                            iscsi_process_flush, iscsilun);
-- 
1.7.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]