Ronnie Sahlberg
a34874289b
Add ascq for WRITE_PROTECTED
2012-07-13 09:43:21 +10:00
Ronnie Sahlberg
3221e631c0
MODE_SENSE Add sync version of mode sense 6
2012-07-13 09:33:41 +10:00
Ronnie Sahlberg
6f4afb6edb
MEDIUM_NOT_PRESENT/TRAY-CLOSED/TRAY_OPEN is not an error that blocks a successful connect
2012-07-12 18:55:35 +10:00
Ronnie Sahlberg
cadc1650e1
Add ASCQ for MEDIUM_NOT_PRESENT
2012-07-10 16:40:58 +10:00
Arne Redlich
6edf993507
Make headers in include/ digestible for C++
...
Also removes trailing whitespace in these files.
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com >
2012-07-08 13:38:41 +02:00
Arne Redlich
121e555897
slist.h: add include guards
...
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com >
2012-07-08 13:34:22 +02:00
Ronnie Sahlberg
d5f646099d
READ10/WRITE10: Change these functions to sue the same signatures as the other READ/WRITE
...
Harmonize the signatures for READ10/WRITE10 to match the ones for READ12/16 and WRITE12/16
This breaks the API/ABI so this forces the next version of the library to bump the major version to 2.0
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-06-05 19:20:02 +10:00
Ronnie Sahlberg
9130d2eb45
Add support for VERIFY12 and tests
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-06-04 20:35:15 +10:00
Ronnie Sahlberg
6003000809
Add VERIFY16 support and tests
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-06-04 20:16:44 +10:00
Ronnie Sahlberg
812df62bfd
SBC: Add GET_LBA_STATUS support and simple test
2012-05-30 18:41:12 +10:00
Ronnie Sahlberg
ed4b8ec72e
W32: Remove our poor emulation of poll() from the w32 build.
2012-05-13 16:46:38 +10:00
Michael Tokarev
aee0e3bf72
always export iscsi_set_tcp_keepalive()
...
Set only the (socket) options which are defined on a given platform.
The function becomes a no-op if no option is known at complie time.
Remove autoconf test for HAVE_TCP_KEEPALIVE too.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru >
2012-05-12 08:41:34 +10:00
Ronnie Sahlberg
733b97f4b8
Add PREFETCH10/16 implementations
2012-05-03 06:21:49 +10:00
Ronnie Sahlberg
2e3126b9ac
TESTS: add tests for READ12/16 RDPROTECT for luns without protection information
2012-05-02 20:14:51 +10:00
Ronnie Sahlberg
974738968d
Implement READ/WRITE_12/16 and a simple test for read16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-05-01 21:54:32 +10:00
Ronnie Sahlberg
9e5535adfd
Reconnect: If we are logged in and we experience a session failure, then
...
try to re-connect and redrive all I/O
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-05-01 18:46:30 +10:00
Ronnie Sahlberg
9c6447b73a
SENSE: add a sense key and an ascq
2012-04-28 15:03:43 +10:00
Ronnie Sahlberg
568e4ddfcc
SBC: Add support for WRITESAME16 and add simple tests using it to unmap blocks from a thin provisioned lun
2012-04-28 14:34:47 +10:00
Ronnie Sahlberg
cc0fa15e14
SBC: Add support for WRITESAME10 and a simple test for using writesame10 to unmap blocks from thin provisioned luns
2012-04-28 13:55:37 +10:00
Ronnie Sahlberg
dd5f94b2ca
Add support for UNMAP command and add a simple test for this opcode
2012-04-22 08:09:15 +10:00
Ronnie Sahlberg
d71a9d4f95
Add support for BLOCK LIMITS VPD page
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-04-20 17:57:40 +10:00
Ronnie Sahlberg
86bf89aabf
Add support for READCAPACITY16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-04-20 17:56:39 +10:00
Ronnie Sahlberg
422bc32ce8
Add support for INQUIRY LOGICAL_BLOCK_PROVISIONING page
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-04-19 20:09:14 +10:00
Ronnie Sahlberg
50594830bd
Task Management. When we abort a task or a task set, or reset the lun or target
...
we must also cancel all active tasks.
This will trigger all affected tasks to have their callback invoked with
SCSI_STATUS_CANCELLED
2012-03-10 12:12:47 +11:00
Ronnie Sahlberg
2b521b4d24
TEST-TOOL: add test for read16/rdprotect
2012-02-05 07:56:35 +11:00
Ronnie Sahlberg
b4573178ca
TEST-TOOL: Add test for read12/rdprotect
2012-02-05 07:52:30 +11:00
Ronnie Sahlberg
cff996a96d
VERIFY10: Add support for VERIFY10. Also add a simple test for verify10
2012-01-26 15:47:14 +11:00
Ronnie Sahlberg
2f23773390
add sync write10
2011-09-29 22:01:53 +10:00
Paolo Bonzini
a1975e90f6
fix warning from -Wuninitialized
2011-09-21 12:00:20 +02:00
Paolo Bonzini
b4a48511ff
fix warning from -Wenum-compare
2011-09-21 11:49:58 +02:00
Ronnie Sahlberg
3c11c3598b
Add a function to cancel a scsi task from libiscsi.
2011-09-19 21:21:40 +10:00
Ronnie Sahlberg
c3d3123981
Windows: Add support to build as a DLL under windows
2011-08-31 13:12:30 +10:00
Ronnie Sahlberg
de97dbdde8
start implementing mode page unmarshalling
2011-04-23 14:02:59 +10:00
Ronnie Sahlberg
7a4b1d2640
Fix documentation of how to use 'zero-copy' reads.
...
The function to specify the read buffers is called
scsi_task_add_data_in_buffer, not scsi_task_add_data_buffer
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2011-04-22 07:51:47 +10:00
Ronnie Sahlberg
3a39201543
Add 'zero-copy' in libiscsi for reads.
...
It is not real zero-copy since the data is still copied in the kernel,
but it avoids copying the data inside libiscsi as well as in the callback.
For SCSI tasks that will return data from the target, the application can now
specify application buffers for libiscsi to read the data directly into.
This is done by calling scsi_task_add_data_in_buffer(task, ...
These buffers need not be linear, you can specify different areas to read into
by calling this function several times.
See examples/iscsiclient.c for an example.
2011-04-20 05:46:17 +10:00
Ronnie Sahlberg
f4ef49e068
Add missing prototype for the read6 cdb function
2011-04-16 16:29:00 +10:00
Ronnie Sahlberg
49dd0fb8b3
Add definition of INVALID OPERATION CODE asqc
2011-04-16 09:55:48 +10:00
Ronnie Sahlberg
07ad0572f2
Add support for READ6
2011-04-16 08:06:16 +10:00
Ronnie Sahlberg
b6782dd7c8
TCP KEEPALIVE support
...
Add tcp keeplaive support on platforms that support these socket options.
Set default to fail the socket after 120 seconds
2011-04-13 21:37:28 +10:00
Ronnie Sahlberg
ef846b0f30
Target initiated NOP:
...
Initial support to try to respond to target initiated NOPs.
2011-04-10 15:33:42 +10:00
Ronnie Sahlberg
cfe19486ee
Add RESERVATION CONFLICT
...
From Richard Sharpe, add support to handle when a target responds with
RESERVATION CONFLICT to a scsi i/o
2011-04-09 12:00:10 +10:00
Ronnie Sahlberg
5225b5fa66
Add definitions for ASCQ LBA-OUT-OF-RANGE
2011-04-04 17:40:13 +10:00
Ronnie Sahlberg
4979b7346f
From Richard Sharpe
...
Add a mechanism where residual overflow/underflow can be reportad back to
the application
We probably need somethinf for bidir residuals at some stage too
2011-03-27 19:27:10 +11:00
Ronnie Sahlberg
343d86dca7
get rid of the _async() scsi functions.
...
We dotn need two interfaces that only diuffer in whether they return a pointer or NULL vs an semiidentical interface that returns 0 or <0
All uses of _async() for scsi tasks should be replaced with the equivalent _task() function instead
2011-03-27 18:17:12 +11:00
Ronnie Sahlberg
f4f6ef5033
change dont automatically free the scsi_task once the callback completes.
...
Freeing the scsi_task structure is the responsibility of the application
to either do so during the callback, or later.
2011-03-27 17:53:05 +11:00
Ronnie Sahlberg
4e6e39ee23
Support for REJECT PDUs.
2011-02-27 13:49:49 +11:00
Ronnie Sahlberg
3561dbbd61
Document the async _task() functions
2011-02-27 10:32:23 +11:00
Ronnie Sahlberg
76208e1eff
Rename the _send() functions to _task()
...
These functions are also async functions for SCSI commands but they return
a task structure or NULL.
This task structure can be used in task management functions to abort the task or a whole task set.
2011-02-27 10:29:51 +11:00
Ronnie Sahlberg
356a6571bb
Login: remember what the TargetAddress returned during login is so we can
...
handle redirect 'errors'.
2011-02-25 15:35:49 +11:00
Ronnie Sahlberg
e9749ee68c
Add ifdefs to protect the header files from being included
...
multiple times
From Richard Sharpe
2011-02-25 14:25:45 +11:00