dmsg - Stabilization work
* Add a refs field to dmsg_state and kdmsg_state for retention and
disposal.
* Separate out the tracking of state->subq and the state RB trees.
* Greatly simplify the iocom shutdown code and functions related
to handling communications failures. When iterating states for
shutdown, which requires simulating a received failure message,
we can now simply iterate via state->subq.
* Greatly simplify how the simulated failures are generated and
handled (See dmsg_msg_simulate_failure()). This is probably the
most complex part of the library.
* Fix a memory leak in kern_dmsg.c.
* Replace xdisk's per-softc token with a lockmgr lock. Atomicy
has to be guaranteed across blocking conditions in certain cases
and it was easier to simply use a lock for everything.
Cleanup the locking.
* Ripout the shutdown check in the I/O path, which can deadlock
the disk management threads. This will need to be revisited
as it means that /dev/xa* and /dev/serno* devices remain in
/dev after a link failure even when there are no opens on the
device.
* Add the B_FAILONDIS flag to struct buf. This flag allows the disk
probe code to tell xdisk that it is ok for the I/O to fail, allowing
xdisk to discard I/Os that would otherwise block or deadlock the
disk probe code when the related network connection is lost.