[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/1] ISCSI: Dont call libiscsi for POLLIN if there a
From: |
Ronnie Sahlberg |
Subject: |
[Qemu-devel] [PATCH 0/1] ISCSI: Dont call libiscsi for POLLIN if there are no bytes readable from the socket |
Date: |
Sat, 12 May 2012 08:04:36 +1000 |
Kevin, List, Paolo
Updated patch based on Paolo's suggestion to do these checks in
iscsi_process_read instead.
Additionally, since this means we can no remain setting a fd-is-readable event
unconditionally we can handle target initiated NOPs better.
For example the case when the initiator is idle for a long time and has no i/o
in flight a target may at this situation send NOPs to the initiator to ping
that it is still alive, as an alternative to TCP-Keepalives.
Unconditionally setting fd-is-readable event means that we will trigger on such
target driven NOPs and can respond to them even if the initiator itself is idle.
When iscsi_process_read is invoked we check if there is a socket error.
If there is we pass POLLIN down to libiscsi and let it handle it, and possibly
also try to reconnect and recover.
If not, we check if there are any available bytes to read using
ioctl(...FIONREAD...) and if there were no bytes avaialble, we assume that this
was probably just a false invocation of the read event so we do nothing and
just return.
If there were bytes available to read from the socket, we pass POLLIN down into
libiscsi as usual and let it read and process them.
regards
ronnie sahlberg
- [Qemu-devel] [PATCH 0/1] ISCSI: Dont call libiscsi for POLLIN if there are no bytes readable from the socket,
Ronnie Sahlberg <=