freebsd-dev/sbin
Kenneth D. Merry 08df2e3eaf Add persistent reservation support to camcontrol(8).
camcontrol(8) now supports a new 'persist' subcommand that allows users to
issue SCSI PERSISTENT RESERVE IN / OUT commands.

sbin/camcontrol/Makefile:
	Add persist.c.

sbin/camcontrol/persist.c:
	New persistent reservation support for camcontrol(8).

	We have support for all known operation modes for PERSISTENT RESERVE
	IN and PERSISTENT RESERVE OUT.
	exceptions noted above.

sbin/camcontrol/camcontrol.8:
	Document the new 'persist' subcommand.

	In the section on the Transport ID (-I) option, explain what
	Transport IDs for each protocol should look like.  At some point
	some of this information could probably get moved off in a
	separate man page, either on Transport IDs alone or a man page
	documenting the Transport ID parsing code.

	Add a number of examples of persistent reservation commands.
	Persistent Reservations are complex enough that the average user
	probably won't be able to get the commands exactly right by just
	reading the man page.  These examples show a few basic and
	advanced examples of how to use persistent reservations.

sbin/camcontrol/camcontrol.h:
	Move the definition for camcontrol_optret here, so we can use it
	for the persistent reservation code.

	Add a definition for the new scsipersist() function.

sbin/camcontrol/camcontrol.c:
	Add 'persist' to the list of subcommands.

	Document 'persist' in the help text.

sys/cam/scsi/scsi_all.c:
	Add the scsi_persistent_reserve_in() and
	scsi_persistent_reserve_out() CCB building functions.

	Add a new function, scsi_transportid_sbuf().  This takes a
	SCSI Transport ID (documented in SPC-4), and prints it to
	an sbuf(9).  There are some transports (like ATA, USB, and
	SSA) for which there is no transport defined.  We need to
	come up with a reasonable thing to do if we're presented
	with a Transport ID that claims to be for one of those
	protocols.

	Add new routines scsi_get_nv() and scsi_nv_to_str().

	These functions do a table lookup to go between a string and an
	integer.  There are lots of table lookups needed in the
	persistent reservation code in camcontrol(8).

	Add a new function, scsi_parse_transportid(), along with leaf node
	functions to parse:
	FC, 1394 and SAS (scsi_parse_transportid_64bit())
	iSCSI (scsi_parse_transportid_iscsi())
	SPI (scsi_parse_transportid_spi())
	RDMA (scsi_parse_transportid_rdma())
	PCIe (scsi_parse_transportid_sop())

	Transport IDs.  Given a string with the general form proto,id these
	functions create a SCSI Transport ID structure.

sys/cam/scsi/scsi_all.h:
	Update the various persistent reservation data structures to
	SPC4r36l, but also rename some fields that were previously
	obsolete with the proper names from older SCSI specs.  This
	allows using older, obsolete persistent reservation types when
	desired.

	Add function prototypes for the new persistent reservation CCB
	building functions.

	Add a data strucure for the READ FULL STATUS service action
	of the PERSISTENT RESERVE IN command.

	Add Transport ID structures for all protocols described in SPC-4.

	Add a new series of SCSI_PROTO_XXX definitions, and
	redefine other defines in terms of these new definitions.

	Add a prototype for scsi_transportid_sbuf().

	Change a couple of "obsolete" persistent reservation data
	structure fields into something more meaningful, based on
	what the field was called when it was defined in the spec.
	(e.g. SPC, SPC-2, etc.)

	Create a new define, SPRI_MAX_LEN, for the maximum allocation
	length allowed for the PERSISTENT RESERVE IN command.

	Add data structures and enumerations for the new name/value
	translation functions.

	Add data structures for SCSI over PCIe Routing IDs.

	Bring the PERSISTENT RESERVE OUT Register and Move parameter list
	structure (struct scsi_per_res_out_parms) up to date with SPC-4.

	Add a data structure for the transport IDs that can optionally be
	appended to the basic PERSISTENT RESERVE OUT parameter list.

	Move SCSI protocol macro definitions out of the VPD page 0x83
	definition and combine them with the more up to date protocol
	definitions higher in the file.

	Add function prototypes for scsi_nv_to_str(), scsi_get_nv(),
	scsi_parse_transportid_64bit(), scsi_parse_transportid_spi(),
	scsi_parse_transportid_rdma(), scsi_parse_transportid_iscsi(),
	scsi_parse_transportid_sop(), and scsi_parse_transportid().

Sponsored by:	Spectra Logic Corporation
MFC after:	1 week
2014-07-03 23:09:44 +00:00
..
adjkerntz use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
atm use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
badsect Add missing static keywords for global variables to tools in sbin/. 2011-11-04 13:36:02 +00:00
bsdlabel Sweep man pages replacing ad -> ada. 2013-10-01 18:41:53 +00:00
camcontrol Add persistent reservation support to camcontrol(8). 2014-07-03 23:09:44 +00:00
casperd use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
ccdconfig Sweep man pages replacing ad -> ada. 2013-10-01 18:41:53 +00:00
clri Switch the default WARNS level for sbin/ to 6. 2009-10-19 16:00:24 +00:00
comcontrol A number of places in the source tree still reference cuad.* after 2012-12-08 22:16:36 +00:00
conscontrol Changed "conscontrol unset" to accept an existing virtual 2011-04-18 20:28:07 +00:00
ddb remove duplicate semicolons where possible. 2012-10-22 03:00:37 +00:00
devd Revert r263694, and apply a better fix to squelch unnecessary warnings 2014-03-26 19:31:33 +00:00
devfs Clarify how "hide" and "unhide" commands work on directories. 2013-07-12 06:03:25 +00:00
dhclient Remove duplicated includes. 2014-06-26 13:57:44 +00:00
dmesg Move the check whether the clear flag is set. This has 2 advantages 2013-06-11 17:46:32 +00:00
dump Mark non-returning function as such 2012-11-29 05:16:50 +00:00
dumpfs When running the -m option to generate a newfs(8) command suitable for 2013-05-16 20:07:08 +00:00
dumpon Adapt to the fact that minidumps are now on by default. 2013-04-30 07:22:03 +00:00
etherswitchcfg Add a license (1) and do some cleanup. 2014-02-04 22:20:17 +00:00
fdisk Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than 2013-11-27 17:59:13 +00:00
fdisk_pc98 Change <sys/diskpc98.h> to not redefine the same symbols that are 2013-08-07 00:00:48 +00:00
ffsinfo use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
fsck In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE. 2014-06-08 17:29:31 +00:00
fsck_ffs Avoid segment fault when attempting to clean up cylinder group 2014-03-12 01:28:21 +00:00
fsck_msdosfs Print a newline after the error message. 2012-11-03 09:18:37 +00:00
fsdb Add globs.c to the build now that it's a separate file. 2013-12-30 01:17:05 +00:00
fsirand use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
gbde use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
geom Document all aliases supported by GEOM_PART class. 2014-07-01 12:44:47 +00:00
ggate use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
growfs use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
gvinum use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
hastctl use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
hastd use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
ifconfig Fix ifconfig to show pltime and vltime with -L option, 2014-06-30 16:39:37 +00:00
init init: Remove code to track line numbers in /etc/ttys. 2014-02-08 13:51:15 +00:00
ipf In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE. 2014-06-08 17:29:31 +00:00
ipfw mdoc: remove superfluous paragraph macros. 2014-06-23 18:40:21 +00:00
iscontrol Reword the part about mutual CHAP. 2013-12-17 10:33:27 +00:00
kldconfig use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
kldload use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
kldstat use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
kldunload use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
ldconfig Add a comment about why aout support is still here: We need it for 2013-03-19 16:57:04 +00:00
mca Fix a variety of compile errors with gcc48 and clang 2012-05-31 08:22:02 +00:00
md5 use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
mdconfig use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
mdmfs Remove trailing whitespace per mdoc lint warning 2012-03-29 05:02:12 +00:00
mknod Fix some more warnings found by clang. 2010-11-22 20:10:48 +00:00
mksnap_ffs Note that a UFS filesystem can have up to 20 active snapshots. 2011-02-15 07:25:54 +00:00
mount use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
mount_cd9660 use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
mount_fusefs mdoc: remove superfluous paragraph macros. 2014-06-23 18:40:21 +00:00
mount_msdosfs use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
mount_nfs Document the noncontigwr NFS mount option. 2013-12-08 00:59:04 +00:00
mount_nullfs GC unused variables. Prefer NULL over 0 for pointers. 2013-03-05 22:41:35 +00:00
mount_udf Unbreak mount_udf by passing the correct iovec length into 2014-02-04 21:15:15 +00:00
mount_unionfs use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
nandfs mdoc: remove superfluous paragraph macro. 2012-05-17 11:29:22 +00:00
natd mdoc: remove superfluous paragraph macros. 2014-06-23 18:40:21 +00:00
newfs Refer newfs and growfs users to fsck_ffs instead of 2014-02-09 14:28:47 +00:00
newfs_msdos use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
newfs_nandfs use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
nfsiod - Display current settings when run without options. 2009-12-26 08:36:02 +00:00
nos-tun use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
nvmecontrol use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
pfctl mdoc: remove superfluous paragraph macros. 2014-06-23 18:40:21 +00:00
pflogd pflogd does not depend on libutil 2013-01-01 18:28:21 +00:00
ping Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
ping6 Remove EOL whitespace. 2013-05-08 21:04:19 +00:00
quotacheck Fix sbin/ build with a 64-bit ino_t. 2012-09-27 23:31:06 +00:00
rcorder use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
reboot use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
recoverdisk use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
resolvconf Add resolvconf(8) which manages resolv.conf. 2011-03-18 12:18:52 +00:00
restore Check the return error of set[e][ug]id. While this can never fail in the 2012-10-22 03:07:05 +00:00
route Fix incorrect netmasks being passed via rtsock. 2014-05-08 11:56:06 +00:00
routed mdoc sweep 2013-05-13 18:13:50 +00:00
rtsol NO_MAN= has been deprecated in favor of MAN= for some time, go ahead 2014-04-13 05:21:56 +00:00
savecore Fix double fclose() in an error case. 2014-04-14 21:44:34 +00:00
sconfig use .Mt to mark up email addresses consistently (part1) 2014-06-20 09:40:43 +00:00
setkey Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
shutdown Add simple example. 2013-03-19 21:40:14 +00:00
spppcontrol mdoc: order prologue macros consistently by Dd/Dt/Os 2010-04-14 19:08:06 +00:00
sunlabel mdoc: fix column names, indentation, column separation within each row, and 2012-04-07 09:05:30 +00:00
swapon swapon: Fix buffer overflow when configuring encrypted swap on GBDE. 2013-12-21 11:59:58 +00:00
sysctl Don't hide zero-length strings when doing sysctl listings. 2014-06-27 15:23:12 +00:00
tests Migrate tools/regression/sbin/ to the new tests layout. 2014-03-16 02:07:08 +00:00
tunefs Constify string pointers. 2013-05-16 21:04:56 +00:00
umount Fix memory leak in umount.c 2012-11-15 15:06:21 +00:00
Makefile Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
Makefile.amd64 Integrate nvmecontrol(8) into the amd64 and i386 builds. 2012-09-17 21:41:38 +00:00
Makefile.arm MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.i386 Integrate nvmecontrol(8) into the amd64 and i386 builds. 2012-09-17 21:41:38 +00:00
Makefile.ia64 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.inc Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
Makefile.mips MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.pc98 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.sparc64 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00