summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* MFC r277647: Fix wrong LUN reference in XCOPY block-to-block operation.mav2015-01-271-1/+1
| | | | | This could cause data corruption due to accessing wrong LUN in case of retries on write errors. Failed writes were retried to read LUN.
* MFC r277385: Remove extra mtx_unlock().mav2015-01-261-1/+0
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r276825 and r277372:hselasky2015-01-201-3/+4
| | | | | Allow a block size of zero to mean 512 bytes, which is the most common block size for USB disks. This fixes support for "Action Cam SJ4000".
* MFC r274036 (by trasz):mav2015-01-031-5/+5
| | | | | s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little nicer code.
* MFC r276141: Hide block device VPD pages for non-block devices.mav2015-01-031-17/+27
|
* MFC r275953: Replace ctl_min() macro with MIN().mav2015-01-036-42/+40
|
* MFC r275943: Constify some static data.mav2015-01-031-16/+16
|
* MFC r275942: Reduce number of places where global control_softc is used.mav2015-01-037-291/+245
| | | | | At some point we may want to have several CTL instances, and that is not really impossible.
* MFC r275864: Make sequence numbers checks more strict.mav2015-01-032-11/+38
| | | | | | | | While we don't support MCS, hole in received sequence numbers may mean only PDU loss. While we don't support lost PDU recovery, terminate the connection to avoid stuck commands. While there, improve handling of sequence numbers wrap after 2^32 PDUs.
* MFC r275920, r276127: Pass real optimal transfer size supported by backend.mav2014-12-264-13/+31
| | | | For files and ZVOLs that is 1MB now, not 128K.
* MFC r275865:mav2014-12-244-10/+71
| | | | | | | | | Add configuration options to override physical and UNMAP blocks geometry. While in most cases CTL should correctly fetch those values from backing storages, there are some initiators (like MS SQL), that may not like large physical block sizes, even if they are true. For such cases allow override fetched values with supported ones (like 4K).
* MFC r275959: Report initiator id in portlist XML in more formalized way.mav2014-12-231-2/+2
|
* MFC r275842: Do not count RCTD bit set as an error.mav2014-12-231-1/+1
| | | | | We can not really implement it, but specification tells that it "shall" work, so it can be safely ignored.
* MFC r274819:smh2014-12-211-5/+5
| | | | | | | | | Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay
* MFC r275568:mav2014-12-185-15/+62
| | | | | | | | | | | | | | | | Count consecutive read requests as blocking in CTL for files and ZVOLs. Technically read requests can be executed in any order or simultaneously since they are not changing any data. But ZFS prefetcher goes crasy when it receives consecutive requests from different threads. Since prefetcher works on level of separate blocks, instead of two consecutive 128K requests it may receive 32 8K requests in mixed order. This patch is more workaround then a real fix, and it does not fix all of prefetcher problems, but it improves sequential read speed by 3-4x times in some configurations. On the other side it may hurt performance if some backing store has no prefetch, that is why it is disabled by default for raw devices.
* MFC r275512:mav2014-12-181-4/+2
| | | | | | | | | In addition to r275481 allow threshold notifications work without UNMAP. While without UNMAP support there is not much initiator can do about it, the administrator still better be notified about the storage overflow. Sponsored by: iXsystems, Inc.
* MFC r275481:mav2014-12-181-0/+28
| | | | | | | | | | | Add to CTL support for threshold notifications for file-backed LUNs. Previously it was supported only for ZVOL-backed LUNs, but now should work for file-backed LUNs too. Used value in this case is a space occupied by the backing file, while available value is an available space on file system. Pool thresholds are still not implemented in this case. Sponsored by: iXsystems, Inc.
* MFC r275474: Add GET LBA STATUS command support to CTL.mav2014-12-187-15/+353
| | | | | | | | It is implemented for LUNs backed by ZVOLs in "dev" mode and files. GEOM has no such API, so for LUNs backed by raw devices all LBAs will be reported as mapped/unknown. Sponsored by: iXsystems, Inc.
* MFC r275461:mav2014-12-181-3/+3
| | | | | | | | | | Increase CTL ports limit from 128 to 256 and LUNs limit from 256 to 1024. After recent optimizations this change is no longer blocked by CTL memory consumption. Those limits are still not free, but much cheaper now. Relnotes: yes Sponsored by: iXsystems, Inc.
* MFC r275459: Unify function names after r275458.mav2014-12-181-12/+12
|
* MFC r275458:mav2014-12-184-128/+141
| | | | | | | | | | Do not pre-allocate UNIT ATTENTIONs storage for every possible initiator. Abusing ability of major UAs cover minor ones we may not account UAs for inactive ports. Allocate UAs storage for port and start accounting only after some initiator from that port fetched its first POWER ON OCCURRED. This reduces per-LUN CTL memory usage from >1MB to less then 100K.
* MFC r275455: Remove some unused code.mav2014-12-181-43/+0
|
* MFC r275447:mav2014-12-182-54/+112
| | | | | | | | Do not pre-allocate reservation keys memory for every possible initiator. In configurations with many ports, like iSCSI, each LUN is typically accessed only by limited subset of ports. Allocating that memory on demand allows to reduce CTL memory usage from 5.3MB/LUN to 1.3MB/LUN.
* MFC r275405: Convert persis_offset from global variable to softc field.mav2014-12-182-11/+11
|
* MFC r275404: Reduce code duplication by creating ctl_set_res_ua() helper.mav2014-12-181-87/+20
|
* MFC r275403: Removed unused variable and unify some names.mav2014-12-181-10/+7
|
* MFC r275365: Move ctlfe_onoffline() out of lock to let it sleep when needed.mav2014-12-181-32/+9
| | | | Do some more other polishing while there.
* MFC r275058: Coalesce last data move and command status for read commands.mav2014-12-187-129/+128
| | | | | | | | | | | | | | Make CTL core and block backend set success status before initiating last data move for read commands. Make CAM target and iSCSI frontends detect such condition and send command status together with data. New I/O flag allows to skip duplicate status sending on later fe_done() call. For Fibre Channel this change saves one of three interrupts per read command, increasing performance from 126K to 160K IOPS. For iSCSI this change saves one of three PDUs per read command, increasing performance from 1M to 1.2M IOPS. Sponsored by: iXsystems, Inc.
* MFC r275032: Decouple datamove/done logic from CTL status set.mav2014-12-181-330/+210
|
* MFC r275009: Use ctl_set_success() instead of direct inlining.mav2014-12-182-10/+5
|
* MFC r274962: Replace home-grown CTL IO allocator with UMA.mav2014-12-189-543/+186
| | | | | | | | | | | | | | | | | Old allocator created significant lock congestion protecting its lists of preallocated I/Os, while UMA provides much better SMP scalability. The downside of UMA is lack of reliable preallocation, that could guarantee successful allocation in non-sleepable environments. But careful code review shown, that only CAM target frontend really has that requirement. Fix that making that frontend preallocate and statically bind CTL I/O for every ATIO/INOT it preallocates any way. That allows to avoid allocations in hot I/O path. Other frontends either may sleep in allocation context or can properly handle allocation errors. On 40-core server with 6 ZVOL-backed LUNs and 7 iSCSI client connections this change increases peak performance from ~700K to >1M IOPS! Yay! :) Sponsored by: iXsystems, Inc.
* MFC r274411: Improve CAM's reaction on asymmetric access errors.mav2014-12-121-3/+3
|
* MFC r275478: Swap resource count scopes for used/available space.mav2014-12-111-2/+2
| | | | Used count should be reported as per-LUN, while available should not.
* MFC r275446: Plug memory leaks on UNMAP and XCOPY with invalid parameters.mav2014-12-102-6/+24
|
* MFC r275368:mav2014-12-081-2/+9
| | | | | | | | | | When passing LUN IDs through treat ASCII values as fixed-length, not interpreating NULLs as EOLs, but converting them to spaces. SPC-4 does not tell that T10-based IDs should be NULL-terminated/padded. And while it tells that it should include only ASCII chars (0x20-0x7F), there are some USB sticks (SanDisk Ultra Fit), that have NULLs inside the value. Treating NULLs as EOLs there made those LUN IDs non-unique.
* MFC r274805:mav2014-12-052-0/+11
| | | | | Make cfiscsi_offline() synchronous, waiting for connections termination before return. This should make ctld restart more clean and predictable.
* MFC r274795:mav2014-12-051-15/+17
| | | | | | Close race between cfiscsi_offline() and new connection arrival. Incoming connection should be either rejected or accepted and terminated.
* MFC r274785: Partially reconstruct Active/Standby clusting.mav2014-12-0511-58/+99
| | | | | | | | | In this mode one head is in Active state, supporting all commands, while another is in Standby state, supporting only minimal LUN discovery subset. It is still incomplete since Standby state requires reservation support, which is impossible to do right without having interlink between heads. But it allows to run some basic experiments.
* MFC r274703:trasz2014-12-031-1/+1
| | | | | | Fix typo. Sponsored by: The FreeBSD Foundation
* MFC r273918:trasz2014-11-301-1/+1
| | | | | | | Change the default log level for iSCSI target from 3 to 1. It should have been 1 from the beginning; not sure how it ended up at 3. Sponsored by: The FreeBSD Foundation
* MFC r274756:mav2014-11-281-17/+1
| | | | | | | Remove residual xpt_release_device() call left after r272406 cleanup. Excessive release here could trigger use-after-free condition and kernel panic on LUN 0 disconnect.
* MFC r274840, r274940:mav2014-11-281-3/+7
| | | | Make iSCSI frontend less chatty while waiting for tasks termination.
* MFC r274790: Remove bunch of unused lun variables.mav2014-11-281-15/+0
|
* MFC r274789: Reduce race between LUN destruction and request arrival.mav2014-11-281-3/+5
|
* MFC r274786: Log errors for absent LUNs too.mav2014-11-281-5/+3
|
* MFC r274154, r274163:mav2014-11-207-26/+402
| | | | | | | | | Add to CTL support for logical block provisioning threshold notifications. For ZVOL-backed LUNs this allows to inform initiators if storage's used or available spaces get above/below the configured thresholds. Sponsored by: iXsystems, Inc.
* MFC r274477: Fix check for vendor-specific peripheral qualifier.mav2014-11-201-1/+1
| | | | Submitted by: anton.rang@isilon.com
* MFC r274333: Handle PREEMPT AND ABORT service action equal to PREEMPT.mav2014-11-162-2/+12
| | | | | With command serialization used in CTL, there are no other commands to abort when PREEMPT AND ABORT gets to run, so it is practically equal to PREEMPT.
* MFC r274206:mav2014-11-142-16/+15
| | | | | Synchronize medium rotation rate in legacy Rigid Disk Drive Geometry mode page with modern Block Device Characteristics VPD page.
* MFC r274081: Fix residual copy/paste in r274080.mav2014-11-111-1/+0
|
OpenPOWER on IntegriCloud