Peter Lieven
ca6f28437a
INIT remove redundant url parsing code
2012-10-30 11:56:12 +01:00
Peter Lieven
9f82d0bf83
INIT allow a trailing / in iscsi_parse_portal_url()
2012-10-30 11:47:12 +01:00
Peter Lieven
774ede1f46
ISCSI_URL change strings from dynamic to static
2012-10-30 11:41:51 +01:00
Peter Lieven
e10a5a97be
Merge remote-tracking branch 'jongrimm/master'
2012-10-30 11:09:38 +01:00
Jon Grimm
f97cd4f816
Test: 0430_report_all_supported_ops: BUG: Need to set return_timeouts parm again after I know full_size.
2012-10-29 18:07:15 -05:00
Peter Lieven
d989474a36
ISCSI-TEST free strings malloc'ed by libpopt
2012-10-29 22:07:58 +01:00
Peter Lieven
2e30d7aafb
CONNECT correctly free ct in case first testunitready fails
2012-10-29 21:37:39 +01:00
Jon Grimm
9f5a315e0c
TEST: skip optional return op codes if not supported.
2012-10-29 10:55:02 -05:00
Peter Lieven
923b9a4fb2
ISCSI-CONTEXT change dynamic string allocations to statics
2012-10-27 17:23:40 +02:00
Peter Lieven
0906109d8a
CONNECT fix mem leak of connection_task object
2012-10-27 16:31:56 +02:00
Peter Lieven
83ac22abbb
Fix memleaks in iscsi-ls, iscsi-inq & iscsi-readcapacity16
2012-10-27 16:18:50 +02:00
Ronnie Sahlberg
74f09ade13
Merge pull request #30 from plieven/master
...
debug level explaination, small improvement to iscsi-readcapacity16 and bounds check for data_size in socket_receive
2012-10-26 18:32:12 -07:00
Peter Lieven
4785dd9933
CONNECT do not reseed RNG in iscsi_reconnect
2012-10-26 20:47:35 +02:00
Peter Lieven
0b4424cca0
CONNECT Fix memory leak in iscsi_reconnect
2012-10-26 20:47:15 +02:00
Peter Lieven
48e55669e3
SLIST add function to debug length
2012-10-26 18:10:26 +02:00
Peter Lieven
89e918e9d7
SOCKET validate data_size in in_pdu header
2012-10-26 17:12:07 +02:00
Peter Lieven
4e7bd8767b
DPRINTF explain debug levels
2012-10-26 08:43:47 +02:00
Peter Lieven
2df2f4f12e
ISCSI_READCAPACITY16 add switch to print only target size
2012-10-26 08:39:37 +02:00
Ronnie Sahlberg
1132e4f941
ISCSI_READCAPACITY16 : Update the output to show all fields in the returned data
...
not just the total size of the device.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-10-25 19:24:09 -07:00
Ronnie Sahlberg
2c7da101b3
Merge pull request #29 from jongrimm/master
...
Adding MaintenanceIn: Read Supported Opcodes
Good stuff!
This opcode is optional, so instead of flagging a test failure, if the opcode returns sense that the opcode is missing then it should just return 'SKIPPED'
Something like
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("READSUPPORTEDOPCODES Not Supported\n");
ret = -2;
scsi_free_scsi_task(task);
goto finished;
}
2012-10-25 18:21:12 -07:00
Jon Grimm
8fbc536779
TYPO: 'calculate' in comments
2012-10-25 12:59:55 -05: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
Ronnie Sahlberg
9eb5b96a82
Merge pull request #28 from plieven/master
...
TEST suite fix + skip command
2012-10-25 06:43:46 -07:00
Peter Lieven
03528f3965
TEST: add skip command to skip individual tests
...
This patch adds a command to skip individual tests. It additionally accepts
more than one test separated by comma.
2012-10-25 10:27:09 +02:00
Peter Lieven
49947fe5e2
TEST: fix unitialized ret variable in T0000
2012-10-25 09:41:28 +02:00
Ronnie Sahlberg
b700d44f03
TESTS: Add a simple test to check that a target survives huge imemdiate data
...
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-10-24 21:19:27 -07:00
Ronnie Sahlberg
97dcf94d72
iSCSI: when reconnecting we should not automatically requeue any DATA-OUT PDUs
...
Dont requeue data-out pdus, or other pdus with the DELETE_WHEN_SENT flag, such
as nops.
These, like the DATA-OUT pdu will instead be automatically re-sent when the original write command is sent again.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com >
2012-10-24 19:32:00 -07:00
Ronnie Sahlberg
a24aca8c50
Merge pull request #27 from plieven/master
...
small fixes + iscsi-readcapacity16 binary
2012-10-24 19:02:31 -07:00
Peter Lieven
2427926327
ISCSI-READCAPACITY16 modified copyright notice
2012-10-23 17:17:53 +02:00
Peter Lieven
fec061ac68
Add iscsi-readcapacity16 binary
...
This patch adds a small binary to read the size of an iscsi target. The value
is returned on stdout.
2012-10-23 15:59:28 +02:00
Peter Lieven
56b1e27980
LD_ISCSI fix whitespace
2012-10-23 10:59:07 +02:00
Peter Lieven
6e82c48185
RECONNECT fix read from freed iscsi context
2012-10-23 10:55:04 +02:00
Peter Lieven
c2836e2a9a
DPRINTF add iscsi target_name if available
...
This patch adds the iscsi target name to the debug output
2012-10-23 10:53:14 +02:00
Ronnie Sahlberg
f74266146c
Merge pull request #25 from plieven/master
...
Fix Compiler warnings + add setters for TCP keepalive values
2012-10-22 06:27:16 -07:00
Peter Lieven
afc963c312
LD_ISCSI: cache last result of get_lba_status
...
get_lba_status returns provisioning for a range of blocks starting
from given lba. Especially for sequential reads its likely that
the next block read is already covered by the last result.
In case there is write support added to ld_iscsi there needs
to be an invalidation code for the cache.
2012-10-21 20:29:39 +02:00
Peter Lieven
bfac1f85a3
LD_SCSI: Introduce get_lba_status in read()
...
For large continous reads I may be benifical to check if the blocks
that are going to be read are allocated. If they are not allocated
they do not need to be read which massivly speeds up the read.
This behaviour is optional and can be turned on with environment
variable LD_ISCSI_GET_LBA_STATUS=1
2012-10-21 09:24:19 +02:00
Peter Lieven
08bfabcd36
LD_ISCSI: Use readcapacity16 instead of readcapacity10
...
This allows for handling volumes larger than 2TB
2012-10-21 08:35:55 +02:00
Peter Lieven
8a3e312f06
LD_ISCSI: Fail open with O_NONBLOCK
...
Non-Blocking I/O is supported nowhere in the code. We should fail
until we have support for it.
2012-10-21 08:24:24 +02:00
Peter Lieven
bca635c75d
LD_ISCSI: storage file mode for further usage
2012-10-21 08:22:17 +02:00
Peter Lieven
54d8aa0ab6
LD_ISCSI: use read16 instead of read10
...
Use READ16 to support for large volumes. READ16 takes a 64bit LBA offset instead
of 32bit.
2012-10-21 08:17:40 +02:00
Peter Lieven
86fa62558e
LD_ISCSI: add debugging support
2012-10-21 08:13:16 +02:00
Peter Lieven
a26a6e12d5
Fix paramter to DPRINTF in tcp_set_user_timeout()
2012-10-20 19:13:53 +02:00
Peter Lieven
d30b279474
Unify paramters in tcp_set_user_timeout()
...
Use the same function definition as in the other tcp setters.
2012-10-20 19:12:13 +02: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
Peter Lieven
3f5a75ce5e
Remove redundant code in iscsi_service()
2012-10-20 19:00:32 +02:00
Peter Lieven
881fc9743a
Use generic tcp_set_sockopt function for tcp setsockopt operations
2012-10-20 18:54:46 +02:00
Peter Lieven
cbae6ae058
Remove accidently left debug message in iscsi_service
2012-10-20 18:44:43 +02:00
Peter Lieven
78a31ad4a1
Add iscsi_set_tcp_syncnt function
...
This patch adds support for setting TCP_SYNCNT to overwrite
the system default values. This allows indirect support
for a configurable connect timeout.
Linux uses a exponential backoff for SYN retries starting
with 1 second.
This means for a value n for TCP_SYNCNT, the connect will
effectively timeout after 2^(n+1)-1 seconds.
2012-10-20 18:43:48 +02:00
Peter Lieven
d1110b7515
Add various environment variables
...
This patch allows the following parameters inside libiscsi to be adjusted without code modification:
LIBISCSI_DEBUG
LIBISCSI_TCP_USER_TIMEOUT
LIBISCSI_TCP_KEEPIDLE
LIBISCSI_TCP_KEEPCNT
LIBISCSI_TCP_KEEPINTVL
You can now enable debugging of libiscsi inside e.g. qemu-kvm with
LIBISCSI_DEBUG=3 qemu-kvm -hda iscsi://...
2012-10-20 18:11:35 +02:00