Alexander Motin
6bff2b5bff
Move ioctl frontend defines where they belong.
2015-09-26 11:56:28 +00:00
Alexander Motin
d3ab449cfa
Remove few more unused variables.
2015-09-26 11:39:54 +00:00
Alexander Motin
9c887a4f86
Remove some duplicate, legacy, dead and questionable code.
2015-09-26 11:28:45 +00:00
Alexander Motin
0bb9989c43
Pass to sobind() copy of the address, not the original.
2015-09-26 01:23:29 +00:00
Alexander Motin
86b7954b92
Properly lock LUN in ctl_failover_lun().
2015-09-25 22:45:23 +00:00
Alexander Motin
f44570f617
Fix bit masks changed for the wrong commands in r288221.
2015-09-25 19:46:34 +00:00
Alexander Motin
5d4dfee032
Constify ctl_serialize_table.
2015-09-25 18:49:25 +00:00
Alexander Motin
c30a4c1871
Remove some dead code found by Clang analyzer.
2015-09-25 18:15:34 +00:00
Alexander Motin
67cc546dfc
Remove stale comments and some excessive empty lines.
2015-09-25 16:34:59 +00:00
Alexander Motin
e675024a02
Switch I/O time accounting from system time to uptime.
...
While there, make num_dmas accounted independently of CTL_TIME_IO.
2015-09-25 10:14:39 +00:00
Alexander Motin
6c068d4bf3
Collect DMA statistics on secondary HA node.
2015-09-25 09:55:51 +00:00
Alexander Motin
116c5818ec
Make HA handle datamove and done in a universal way, using port methods.
...
Now from primary node point of view requests transferred from secondary
node should look almost normal and always have valid port.
2015-09-25 09:14:29 +00:00
Alexander Motin
21d963e528
Remove some control_softc references.
2015-09-25 07:27:23 +00:00
Alexander Motin
6c2acea564
Allow WRITE SAME with NDOB bit set but without UNMAP.
...
This combination was originally forbidden, but allowed at spc4r3.
2015-09-24 15:59:08 +00:00
Alexander Motin
4ef0129a46
Add new report types to REPORT LUNS command.
...
This is only for completeness, since we have nothing new to report there.
2015-09-24 12:22:47 +00:00
Alexander Motin
a6daea64fd
Update WRITE ATOMIC(16) support to sbc4r8 draft.
...
This is only a cosmetic change. We still don't support atomic boundary
field in the CDB, but at least now we do it formally.
2015-09-24 08:04:47 +00:00
Alexander Motin
de988746be
Add support for READ BUFFER(16) command.
2015-09-24 07:16:34 +00:00
Alexander Motin
ca85b7c4e9
Synchronize mode pages between HA peers.
...
We allow to modify only few fields in mode pages now, but still it is
not good if they unexpectedly change during failover. Also this fixes
reporting of "Mode parameters changed" UAs on secondary node.
2015-09-23 18:33:00 +00:00
Alexander Motin
a85700a912
Make HA peers announce their parameters on connect.
...
HA protocol requires strict version, parameters and configuration match.
Differences there may cause full set of problems up to kernel panic.
To avoid that, validate peer parameters on connect, and abort connection
immediately if some mismatch detected.
2015-09-23 15:49:27 +00:00
Alexander Motin
c53993057b
Add support for Control extension mode page.
2015-09-22 14:55:46 +00:00
Alexander Motin
4ce7a0868c
Remove duplicate and incomplete code handling LUN modify.
...
Instead reuse code from LUN creation. This allows most of LUN media
options to be changed live with modify request without full restart.
2015-09-22 10:45:50 +00:00
Alexander Motin
8153ec9ad5
Log iSCSI session reinstatements.
...
False session reinstatements can be result of misconfiguration, when
several initiators use the same initiator name and ISID.
2015-09-21 13:25:29 +00:00
Alexander Motin
218d25d00b
Mark with DMA flag I/Os waiting for iSCSI write data after R2T.
...
Reads and immediate writes are not blocking, so don't bother.
2015-09-20 11:39:19 +00:00
Alexander Motin
b22213694e
Remove couple excess SGLIST I/O flags.
...
Those flags duplicated respective (sg_entries > 0) values.
2015-09-20 10:40:30 +00:00
Alexander Motin
921af50782
Always execute REPORT LUNS and REQUEST SENSE commands locally.
...
REPORT LUNS command is more related to target rather then specific LUN.
This node may be primary for LUNs for some reason unknown to another,
and command forwarded to another node won't be able to report them.
REQUEST SENSE is related to LUN, but in our implementation it reports
only UAs and CAs, that are stored locally rather then on primary node.
2015-09-19 19:30:55 +00:00
Alexander Motin
efbf6139a4
Split two command flags with different meaning.
...
This is only a cosmetical change.
2015-09-19 19:11:59 +00:00
Alexander Motin
027dd0cfd0
Pack struct ctl_ha_msg_hdr by 8 bytes.
2015-09-19 18:23:06 +00:00
Alexander Motin
6861045bda
Fix memory corruption when >128K transferred through HA link.
...
While there, do some cleaning.
2015-09-19 13:12:09 +00:00
Alexander Motin
bc8749e2ff
Mark I/Os with DMA flag while moving data through the HA link.
2015-09-18 20:11:10 +00:00
Alexander Motin
75a3108e13
Relax serseq option operation for reads.
...
Previously, with serseq enabled, next command was unblocked only after
previous completed. With this change, for read operations, next command
is unblocked as soon as last media read completed. This is important
for frontends that actually wait for data move completion (like camtgt),
or when data are moved through the HA link, or especially when both.
2015-09-18 19:43:14 +00:00
Alexander Motin
59bb97a934
Kill HA link and shutdown the threads on shutdown.
2015-09-18 12:08:00 +00:00
Alexander Motin
1c69dbd098
Update list of opcodes to 5/26/15.
2015-09-18 10:44:25 +00:00
Alexander Motin
f90e68de18
Update list of ASC/ASCQ codes from 5/20/12 to 8/12/15.
2015-09-18 10:23:17 +00:00
Alexander Motin
0c05f0dc16
Replicate initiators WWPNs and names between HA peers.
2015-09-17 21:51:11 +00:00
Alexander Motin
54713bce25
Replicate port->init_devid to HA peer.
2015-09-17 20:36:34 +00:00
Alexander Motin
6213882769
When reporting TPT UA, report which of thresholds was reached.
2015-09-17 17:00:36 +00:00
Alexander Motin
042e9bdc41
Report number of failed XCOPY segment.
2015-09-17 14:22:52 +00:00
Alexander Motin
7f7bb97a0f
Report proper medium error code for VERIFY commands.
2015-09-17 12:52:18 +00:00
Alexander Motin
83981e319d
Fix reading after end of file for file-backed LUNs.
...
If backing file is smaller then the LUN size, we have to explicitly clear
the rest of the buffer to not leak some random data from previous I/Os.
2015-09-16 21:43:51 +00:00
Alexander Motin
d6043e4643
Make COMPARE AND WRITE report offset of difference.
2015-09-16 18:33:04 +00:00
Alexander Motin
723c363f7f
Fix fixed sense writing when passed more data then it can fit.
...
MFC after: 1 week
2015-09-16 17:56:24 +00:00
Alexander Motin
5c5fb901eb
Frontends don't need to set errors themselves.
2015-09-16 13:25:35 +00:00
Alexander Motin
e2c3044b13
Don't flap the HA link if sysctl is reset to the same value.
2015-09-16 09:59:05 +00:00
Alexander Motin
c39d464164
Make CAM log errors that make it wait.
...
Waiting can take minutes, and it would be good for user to know what is
going on.
MFC after: 2 weeks
2015-09-15 10:57:16 +00:00
Alexander Motin
18e87f95f7
Fix completion/error status reporting.
2015-09-15 10:42:53 +00:00
Alexander Motin
923863546a
Close potential race between datamove and HA failover.
2015-09-15 09:36:46 +00:00
Mark Johnston
87dd1668e0
Preserve the device queue status before retrying a sense request in
...
chdone(). Previously, the retry could clear the CAM_DEV_QFRZN bit in the
CCB status, leaving the queue frozen.
Submitted by: Jeff Miller <Jeff.Miller@isilon.com>
Reviewed by: ken
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-09-15 05:09:17 +00:00
Alexander Motin
d0f25804a7
Implement data/status aggregation for secondary HA node.
...
For short read requests this reduces latency by 30%, reporting command
completion after two interlink roundtrips instead of full three.
2015-09-14 15:21:23 +00:00
Alexander Motin
3ed019a919
Implement data/status aggregation for camsim backend.
...
This is almost pointless for primary HA node, but useful for secondary,
where between fe_datamove and fe_done calls goes another link roundtrip.
2015-09-14 15:15:32 +00:00
Alexander Motin
7b6660c9aa
Remove CTL_PRIV_LBA_LEN from HA messages.
...
Previously it was used for statistics, but now just a 16 extra bytes.
2015-09-14 09:56:01 +00:00