Ronnie Sahlberg
02fd6217cb
Add support for WRITE_ATOMIC_16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-09-08 10:16:57 -07:00
Ronnie Sahlberg
0630aa5ef0
Timeouts: Fix bugs in scsi task timeout code
...
Add a test to verify the pdu timeout handling.
Fix numerous bugs in the timeout handling. It was really broken.
Add test for non-SCSI task PDUs too and verify they works.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2015-05-24 14:34:06 -07:00
Peter Lieven
e219f1bb97
utils/examples: avoid busy waiting on wait for reconnect
...
Signed-off-by: Peter Lieven <pl@kamp.de >
2015-04-13 10:26:28 +02:00
Peter Lieven
a8b33cefac
drop iscsi->is_reconnecting
...
iscsi->is_reconnecting != 0 is equal to iscsi->old_iscsi != NULL.
Signed-off-by: Peter Lieven <pl@kamp.de >
2015-04-13 10:13:36 +02:00
Peter Lieven
8398059635
sync: add iscsi_reconnect_sync
...
This function represents the old sync reconnect behaviour.
Signed-off-by: Peter Lieven <pl@kamp.de >
2015-03-31 16:33:36 +02:00
Ronnie Sahlberg
fd38ff4bfc
Add MODESENSE6/10 and MODESELECT6/10 support
2013-07-20 14:05:20 -07:00
Ronnie Sahlberg
7895fb700c
Add MODESELECT6 support
...
Add support for MODESELECT6 and add marshalling functions for the
mode pages we support so far.
2013-07-06 16:11:17 -07:00
Ronnie Sahlberg
92b987de52
Add helpers for the SANITIZE service actions
2013-05-26 10:51:19 -07:00
Ronnie Sahlberg
eebd04e613
Add initial support for SANITIZE and a simple test to generate this opcode.
2013-05-25 16:02:02 -07:00
Ronnie Sahlberg
ce4623b2fb
READ SUPPORTED OPCODES. Update the signature to allow setting all of the
...
parameters to this command.
2013-05-18 12:34:03 -07:00
Ronnie Sahlberg
4a8d967541
Add support for synchronous command timeout.
...
Default to 0 meaning no timeout.
Implement a test for iSCS to test what happens if we send a command
with CMDSN being higher than the target allows.
In this case we dont strictly know what will happen, just that what should
NOT happen is the target responding with success.
But we have to be prepared for any kind of failure, including a timeout,
scsi sense, or even iscsi reject or session failure.
2013-04-29 20:42:33 -07:00
Ronnie Sahlberg
e640fa3cde
missing , broke compile
2013-04-22 18:28:20 -07:00
Ronnie Sahlberg
402653b9f3
portability updates
...
add check if ipv6/sockaddr_in6 is availavble or not
add check for poll.h and only include when available
add includes for AROS
2013-04-18 19:43:36 -07:00
Ronnie Sahlberg
fbf58ead9f
TESTS: When task management functions fail, print the reason why it failed.
2013-03-27 17:25:47 -07:00
Ronnie Sahlberg
aac7ed29b8
SYNC Task mgmt functions. Return !0 status if the command completed successfully
...
but the target responded with non-zero response code.
2013-03-26 17:38:47 -07:00
Ronnie Sahlberg
0d5c8a4f11
TESTS: Add test for PREVENTALLOWMEDIUMREMOVAL are cleared on lun/target reset
2013-03-03 13:37:52 -08:00
Ronnie Sahlberg
0f73f062d2
SCSI: remove LBDATA/PBDATA from the WriteSame10/16 signatures
...
Make LBA the third argument to the iscsi writesame functions
2013-01-21 21:15:37 -08:00
Ronnie Sahlberg
2a74fc00bc
Initial support for PERSISTENT_RESERVER_OUT and add a simple test to show the api
2012-12-17 21:25:46 -08:00
Ronnie Sahlberg
c60093eafe
Add support for PERSISTENT_RESERVE_IN and add a simple test for READ_KEYS
2012-12-17 19:01:50 -08:00
Peter Lieven
30804507f9
SYNC set status to -1 on error in event_loop
...
If there is an error in iscsi_service or on poll we
exit the event_loop. But in this case scsi_sync_cb is
never reached and the status is 0. This will make
the caller think that the sync task has been completed
successfully.
2012-11-18 14:00:31 -08:00
Peter Lieven
577d37c5ed
RECONNECT exit from sync event_loop in case of an error
...
If there is an error during reconnect we should not loop in event_loop
as this will cause a deadlock in case there is actually an error like
connection drop etc. If this reconnect fails the reconnect routine
will retry itself.
2012-11-18 13:59:53 -08:00
Jon Grimm
b81bdd3932
Merge with upstream
2012-10-25 12:56:26 -05:00
Jon Grimm
1eaca70a52
Add MaintenanceIn: Report Supported Opcodes (all) and testcase.
2012-10-25 12:48:37 -05:00
Peter Lieven
20cf2b279e
Fix incorrect whitespaces
...
At a few places there where spaces where tabulators where appropriate
2012-10-20 19:08:57 +02:00
Jon Grimm
c7d8d2593c
Add RESERVE6/RELEASE6 Support.
2012-09-27 12:45:06 -05:00
Jon Grimm
e55ec72f36
Add Read TOC (0x43) Command Support (and basic testcase).
2012-09-24 10:15:00 -05:00
Ronnie Sahlberg
08034c3335
SYNC CONNECT: make sure state is non-NULL before we dereference it
2012-08-09 08:46:29 +10:00
Ronnie Sahlberg
06cc2d2ece
CONNECT: connect data is not always malloc()ed so we can demand it is free()able
...
After a sync connection, make sure to clear connect_data since it will otherwise
point to a structure on the stack.
2012-08-09 08:27:48 +10:00
Ronnie Sahlberg
16da01ed4e
Add PREVENTALLOWMEDIUMREMOVAL support
2012-07-17 18:12:03 +10:00
Ronnie Sahlberg
025136e81c
Add support for STARTSTOPUNIT command
2012-07-15 08:10:39 +10:00
Ronnie Sahlberg
1ce5d97e57
TEST: Add test for ORWRITE command
2012-07-14 17:29:58 +10:00
Ronnie Sahlberg
11f7da678b
Add support for ORWRITE
2012-07-14 17:01:38 +10:00
Ronnie Sahlberg
bdd6e6bb11
Add support for COMPARE_AND_WRITE command
2012-07-14 11:34:40 +10:00
Ronnie Sahlberg
29f5e9378f
Add support for WRITEVERIFY10/12/16
2012-07-14 08:19:43 +10:00
Ronnie Sahlberg
1745f76bef
Add SYNCHRONIZECACHE16 support
2012-07-13 10:19:44 +10:00
Ronnie Sahlberg
3221e631c0
MODE_SENSE Add sync version of mode sense 6
2012-07-13 09:33:41 +10: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
201d6c3b54
win32: sinc.c need the compatibility header so it finds the replacement for poll()
2012-05-15 21:51:53 +10:00
Ronnie Sahlberg
733b97f4b8
Add PREFETCH10/16 implementations
2012-05-03 06:21:49 +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
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
86bf89aabf
Add support for READCAPACITY16
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-04-20 17:56:39 +10: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