freebsd-skq/sbin/camcontrol
ken 237640bee9 Add task attribute support to camcontrol(8).
Users can use the new generic argument, -Q task_attr, to specify a task
attribute (simple, ordered, head of queue, aca) for the commands issued.
The the default is simple, which works with all SCSI devices that support
tagged queueing.

This will mostly be useful for debugging target behavior in certain
situations.

You can try it out by compiling CTL with CTL_IO_DELAY turned on (in
sys/cam/ctl/ctl_io.h) and then do something like this with one of the CTL
LUNs:

ctladm delay 0:0 -l done -t 10
camcontrol tur da34 -v

And at then before the 10 second timer is up, in another terminal:

camcontrol inquiry da34 -Q ordered -v

The Inquiry should complete just after the TUR completes.  Ordinarily
it would complete first because of the delay injection, but because the
task attribute is set to ordered in this case, CTL holds it up until the
previous command has completed.

sbin/camcontrol/camcontrol.c:
	Add the new generic argument, -Q, which allows the user to specify
	a SCSI task attribute.  The user can specify task attributes by
	name or numerically.

	Add a new task_attr arguments to SCSI sub-functions.

sbin/camcontrol/attrib.c,
sbin/camcontrol/camcontrol.h,
sbin/camcontrol/fwdownload.c,
sbin/camcontrol/modeedit.c,
sbin/camcontrol/persist.c,
sbin/camcontrol/timestamp.c,
sbin/camcontrol/zone.c:
	Add the new task_attr argument to SCSI sub-functions.

sbin/camcontrol/camcontrol.8:
	Document the new -Q option, and add an example.

Sponsored by:	Spectra Logic
MFC after:	1 week
2017-02-17 20:04:22 +00:00
..
attrib.c Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
camcontrol.8 Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
camcontrol.c Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
camcontrol.h Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
epc.c Misc Coverity fixes in camcontrol(8) 2017-01-20 21:21:41 +00:00
fwdownload.c Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
Makefile Add SCSI REPORT TIMESTAMP and SET TIMESTAMP support. 2016-12-01 22:20:27 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00
modeedit.c Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
persist.c Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
progress.c Use nitems() from sys/param.h. 2016-04-19 11:12:57 +00:00
progress.h Add progress.c and progress.h, missed in the previous commit to camcontrol. 2012-06-20 04:11:34 +00:00
timestamp.c Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00
util.c
zone.c Add task attribute support to camcontrol(8). 2017-02-17 20:04:22 +00:00