MFC 251470:
Do not compare the existing mask of a cpuset with a new mask when changing
the mask of a cpuset.  Also, change the cpuset's mask before updating the
masks of all children.  Previously changing a cpuset's mask first required
setting the mask to a super-set of both the old and new masks and then
changing it a second time to the new mask.
MFC 252037: Document RA_RECURSED and RA_NOTRECURSED.
MFC 251323:
- Handle the recursed/not recursed flags with RA_RLOCKED in rw_assert().
- Tweak a panic message.
A set of MFCs allowing stable/9 to be built again on head after r250881:

r250227:
Improve compatibility with recent flex from flex.sourceforge.net.

r250914:
Improve compatibility with old flex and fix build with GCC.

r250926 (partial):
Work around build breakages with GCC 4.2.
MFC of 250891, 250892, 250894, 250895, 250897, and 250901

MFC 250891:

Properly spell sentinel (not sintenel or sentinal).
No functional changes.

Spotted by:  kib

MFC 250892:

Remove a bogus check for a NULL buffer pointer.
Add a KASSERT that it is not NULL.

Found by:    Coverity Scan, CID 1009114
Reviewed by: kib

MFC 250894:

Null a pointer after it is freed so that when it is returned
the return value is NULL. Based on the returned flags, the
return value should never be inspected in the case where NULL
is returned, but it is good coding practice not to return a
pointer to freed memory.

Found by:    Coverity Scan, CID 1006096
Reviewed by: kib

MFC 250895:

Add missing 28th element to softdep types name array.

Found by:    Coverity Scan, CID 1007621
Reviewed by: kib

MFC 250897:

Add missing buffer releases (brelse) after bread calls that return
an error. One could argue that returning a buffer even when it is
not valid is incorrect, but bread has always returned a buffer
valid or not.

Reviewed by: kib

MFC 250901:

Properly spell sentinel (missed in 250891)
No functional changes.

Spotted by:  Navdeep Parhar and Alexey Dokuchaev
MFC r251796

  Fix setting of the Rx filters

  QEMU 1.4 made the descriptor requirement stricter - the size of buffer
  descriptor must exactly match the number of MAC addresses provided.
MFC r251945:
Pass proper memory type to free() in ata_ali_chipinit().
MFC r251743:
Improve firmware download status check.  Previous check was insufficient for
ATA since it ignored transport errors like command timeouts, while for SCSI
it was just wrong.
MFC r251792:
Restore use of polling mode for disk cache flush in case of kernel panic.
While I am not sure that any extra hardware access is a good idea after
panic, that is an existing behaviour that should better work correctly.
MFC r249980:
Give periph validity flag own periph reference.  That slightly simplifies
the release logic and covers hypothetical case if lock is dropped inside
the periph_oninval() method.
MFC r250377:
	Allow the use of lowercase 'yes'

PR:		bin/178422
MFC: 249658, 249701

Update chio(1) and ch(4) to support reporting element designators.

This allows mapping a tape drive in a changer (as reported by
'chio status') to a sa(4) driver instance by comparing the
serial numbers.

The designators can be ASCII (which is printed out directly), binary
(which is printed in hex format) or UTF-8, which is printed in either
native UTF-8 format if the terminal can support it, or in %XX notation
for non-ASCII characters.  Thanks to Hiroki Sato <hrs@> for the
explanation and example UTF-8 printing code.

chio.h:		Modify the changer_element_status structure to add new
		fields and definitions from the SMC3r16 spec.

		Rename the original CHIOGSTATUS ioctl to OCHIOGTATUS and
		define a new CHIOGSTATUS ioctl.

		Clean up some tab/space issues.

chio.c: 	For the 'status' subcommand, print the designator field
		if it is supplied by a device.

scsi_ch.h:	Add new flags for DVCID and CURDATA to the READ
		ELEMENT STATUS command structure.

		Add a read_element_status_device_id structure
		for the data fields in the new standard. Add new
		unions, dt_or_obsolete and voltage_devid, to hold
		and address data from either SCSI-2 or newer devices.

scsi_ch.c:	Implement support for fetching device IDs with READ
		ELEMENT STATUS data.

		Add new arguments to scsi_read_element_status() to
		allow the user to request the DVCID and CURDATA bits.
		This isn't compiled into libcam (it's only an internal
		kernel interface), so we don't need any special
		handling for the API change.

		If the user issues the new CHIOGSTATUS ioctl, copy all of
		the available element status data out.  If he issues the
		OCHIOGSTATUS ioctl, we don't copy the new fields in the
		structure.

		Fix a bug in chopen() that would result in the peripheral
		never getting unheld if chgetparams() failed.

Sponsored by:	Spectra Logic
Submitted by:	Po-Li Soong
MFC r251560

Fix a bad calloc(3) call
MFC r240616, r240619, r240620:

Merge initial NVM Express (NVMe) commits to stable/9.

This only pulls the nvme(4), nvd(4) and nvmecontrol(8) code into stable/9.
A follow-up commit will link it into the build and merge all of the
additional commits made for NVMe over the last few months.

Sponsored by:	Intel
240618, 240621, 240633, 240671, 240672, 240697, 240700, 241433,
241434, 241657, 241658, 241659, 241660, 241661, 241662, 241663,
241664, 241665, 241689, 242420, 243951, 244410, 244411, 244413,
244549, 245136, 247963, 248729, 248730, 248731, 248732, 248733,
248734, 248735, 248736, 248737, 248738, 248739, 248740, 248741,
248746, 248747, 248748, 248749, 248754, 248755, 248756, 248757,
248758, 248759, 248760, 248761, 248762, 248763, 248764, 248765,
248766, 248767, 248768, 248769, 248770, 248771, 248772, 248773,
248780, 248834, 248835, 248913, 248977, 249067, 249416, 249417,
249418, 249419, 249420, 249421, 249422, 249432
Forced commit due to bad commit message in r252222.

MFC:
r240618, r240621, r240633, r240671, r240672, r240697, r240700, r241433,
r241434, r241657, r241658, r241659, r241660, r241661, r241662, r241663,
r241664, r241665, r241689, r242420, r243951, r244410, r244411, r244413,
r244549, r245136, r247963, r248729, r248730, r248731, r248732, r248733,
r248734, r248735, r248736, r248737, r248738, r248739, r248740, r248741,
r248746, r248747, r248748, r248749, r248754, r248755, r248756, r248757,
r248758, r248759, r248760, r248761, r248762, r248763, r248764, r248765,
r248766, r248767, r248768, r248769, r248770, r248771, r248772, r248773,
r248780, r248834, r248835, r248913, r248977, r249067, r249416, r249417,
r249418, r249419, r249420, r249421, r249422, r249432

Merge all NVMe-related changes since the original code was added to HEAD,
including linking it into the build.

Sponsored by:	Intel
MFC r251652, r251811, r252101:

r251652:
  Add new script to run release builds.  The script is heavily based upon
  the release/generate-release.sh script by nwhitehorn.

  This script can use optional configuration file to override defaults,
  making running multiple serialzied builds with different specific
  configurations or architecture-specific tunings quite easy.

  Sample overrideable options are included in the release.conf.sample
  file.

r251811:
  Fix OSVERSION variable within PBUILD_FLAGS.

r252101:
  If MAKE_CONF and/or SRC_CONF are set and not character devices,
  copy to chroot to use with release build.

Approved by:	kib (mentor, implicit)
Set SRCBRANCH to stable/9 in release.conf.sample.

This is a direct commit to stable/9.

Approved by:	kib (mentor, implicit)
MFC	r252103:

Define and use e2fs_lbn_t in ext2fs.

In line to what is done in UFS, define an internal type
e2fs_lbn_t for the logical block numbers.

This change is basically a no-op as the new type is unchanged
(int32_t) but it may be useful as bumping this may be required
for ext4fs.

Also, as pointed out by Bruce Evans:

-Use daddr_t for daddr in ext2_bmaparray(). This seems to
improve reliability with the reallocblks option.
- Add a cast to the fsbtodb() macro as in UFS.
MFC r251985:
When enabling the cancellation, only process the pending cancellation
for asynchronous mode.