Stefan Hajnoczi faec3c0dfd Only await POLLOUT events until connected
Non-blocking socket connect(2) involves waiting for the socket to become
writeable to detect that a connection has been made.  POLLIN events
should not be requested until the socket is connected because they are
processed even if the iSCSI context is not yet connected.

For example, the QEMU iscsi block driver does something like this:

iscsi_full_connect_async(...)

/* Now wait until the socket becomes ready */
poll(POLLIN|POLLOUT) = POLLIN|POLLOUT

/* QEMU calls POLLIN and POLLOUT handlers individually and it happens to
 * call the POLLIN handler *before* the POLLOUT handler.
 */
iscsi_service(POLLIN)
iscsi_service(POLLOUT)

POLLIN processing will read from the socket and consume the error code
if connect failed.  As a result, the POLLOUT handler will write to a
disconnected socket and raise a SIGPIPE which kills the process.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2010-12-29 08:57:48 +00:00
2010-12-05 08:24:57 +11:00
2010-12-22 22:23:55 +11:00
RPM
2010-12-21 20:09:46 +11:00
2010-12-25 12:04:29 +11:00
2010-12-11 11:47:28 +11:00
2010-12-05 16:13:44 +11:00
2010-12-21 20:03:13 +11:00
2010-12-22 22:29:46 +11:00

Libiscsi is a clientside library to implement the iSCSI protocol
that can be used to access resource of an iSCSI Target.

The library is fully async with regards to iscsi commands and scsi
tasks, but a sync layer is also provided for ease of use for simpler
applications.


The src directory contain a handful of useful iscsi utilities
such as logging in to and enumerating all targets on a portal
and all devices of a target.

The examples directory contain example implementation of how to
access both the sync and acync api of libiscsi.



Libiscsi is a work in progress.
It aims to become a full async library for iscsi functionality,
including all features required to establish and maintain a iscsi
session, as well as a low level scsi library to create scsi cdb's
and parse/unmarshall data-in structures.


Installation
============
./autogen.sh
./configure
make
sudo make install

Build RPM
=========
To build RPMs run the following script from the libiscsi root directory
./packaging/RPM/makerpms.sh

Description
Userspace iSCSI Initiator Tools for macOS
Readme 6.6 MiB
Languages
C 97.7%
Shell 1.2%
Makefile 0.6%
M4 0.5%