Alexander Motin
5b9676b17b
Add two more KASSERTs.
2015-11-06 17:29:21 +00:00
Alexander Motin
c71150ce5d
Extend mask of VMware virtual disks.
2015-11-05 09:07:53 +00:00
Alexander Motin
10643dd70e
Don't try to replicate mode pages not present on this device.
...
MFC after: 3 days
2015-10-26 14:14:56 +00:00
Alexander Motin
59f063d549
Give CTL support for PIM_EXTLUNS when talking to CAM.
...
CTL itself still lives in flat LUN space, but it can generate extended
numbers if CAM SIM reports such capability.
2015-10-24 17:24:19 +00:00
Alexander Motin
c98d2b1f1e
Add partial support for QUERY TMF to CAM and isp(4).
...
This change allows to decode respective functions in isp(4) in target mode
and pass them through CAM to CTL. Unfortunately neither CAM nor isp(4)
support returning response info for those task management functions now.
On the other side I just have no initiator to test this functionality.
2015-10-23 18:34:18 +00:00
Alexander Motin
aeb1faa040
Fix LUN disable in CAM broken at r285155.
...
MFC after: 1 week
2015-10-23 10:39:43 +00:00
Alexander Motin
5124012aae
Make some panic strings mode informative.
2015-10-21 15:31:26 +00:00
Alexander Motin
0ac03010f6
Make delete method set via kern.cam.da.X.delete_method persistent.
...
This allows to set delete method via tunable, before device capabilities
are known. Also allow ZERO method for devices not reporting LBP, if user
explicitly requests it -- it may be useful if storage supports compression
and WRITE SAME, but does not support UNMAP.
MFC after: 2 weeks
2015-10-11 18:26:06 +00:00
Alexander Motin
6854699543
Remove legacy CHS geometry from dmesg and unify capacity outputs.
2015-10-11 13:48:20 +00:00
Alexander Motin
4a3760bae6
Remove compatibility shims for legacy ATA device names.
...
We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely
removed old stack at 10.x, so at 11.x it is time to remove compat shims.
2015-10-11 13:01:51 +00:00
Alexander Motin
361e885315
Remove lock upgrade attempt from ctl_be_block_open_file().
...
I am not sure what for it was done. Now open routine should automatically
fall back to read-only if open for writing is impossible. In such case
attempt to upgrade to write sounds strange.
MFC after: 1 week
2015-10-11 08:28:49 +00:00
Alexander Motin
3d5cb709bd
Add missing vnode lock in case of file modify request.
...
Submitted by: Richard Kojedzinszky
MFC after: 1 week
2015-10-08 07:34:30 +00:00
Alexander Motin
0952a19f7d
More aggressively fill WUT read pipeline.
...
On some tests I've measured 5% copy speedup from this.
2015-10-01 19:07:15 +00:00
Alexander Motin
6ac1446d0e
Make zero WUT use WRITE SAME with recently allowed NDOB flag.
2015-10-01 16:30:20 +00:00
Alexander Motin
f24b1dc90c
Implement SPC-3 exceptions to SPC-2 RESERVE and RELEASE behavior.
2015-10-01 12:57:37 +00:00
Alexander Motin
f53270c858
Unify PR variable names to reduce confusion.
2015-10-01 12:15:36 +00:00
Alexander Motin
f5a2bbe6d6
Use proper STAILQ_* macros where possible.
2015-09-30 20:38:35 +00:00
Alexander Motin
de2393124c
Make pass, sg and targ drivers respect HBA's maxio.
...
Previous limitation of 64K (DFLTPHYS) is quite annoying.
2015-09-30 13:31:37 +00:00
Alexander Motin
66b6967686
Really implement PREVENT ALLOW MEDIUM REMOVAL command.
2015-09-29 15:12:40 +00:00
Alexander Motin
7f3d6f1fe3
Don't report SYNC_NV bit set in SYNCHRONIZE CACHE as error.
...
While this bit is obsolete in SBC-3, behavior controlled by it is allowed
on device discretion.
2015-09-29 13:58:27 +00:00
Alexander Motin
862aedb0d6
Fix arguments order.
2015-09-29 12:53:41 +00:00
Alexander Motin
6908da41fa
Report that we can read all flavours of DVD. Why not?
2015-09-29 10:44:37 +00:00
Alexander Motin
d6e7f6e741
Add CD/DVD Capabilities and Mechanical Status Page.
...
This page is obsolete since MMC-4, but still used by some software.
2015-09-29 09:09:37 +00:00
Alexander Motin
648dfc1a29
Umplement media load/eject support for removable devices.
...
In case of block backend eject really closes the backing store, while
load tries to open it back. Failed store open is reported as no media.
2015-09-28 20:54:18 +00:00
Alexander Motin
91be33dc78
Add to CTL initial support for CDROMs and removable devices.
...
Relnotes: yes
2015-09-27 13:47:28 +00:00
Alexander Motin
2e33ae99cf
Allow LOG SENSE command on non-disk devices.
2015-09-26 13:51:29 +00:00
Alexander Motin
0b33261bbe
Remove concept of control device.
2015-09-26 12:53:55 +00:00
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