MFC	r245612:

ext2fs: Add some DOINGASYNC checks to match ffs.
This is mostly cosmetical.

Reviewed by:    bde
MFC	r245648:

newfs_msdos: cosmetical cleanups

- Simplify diagnostic messages.
- Adopt lowercase first letters to make the messages
  more canonical.

PR:		bin/175404
Submitted by:	Christoph Mallon
Reviewed by:	bde
MFC r242492:

 - In cancel_mkdir_dotdot don't panic if the inodedep is not available.  If
   the previous diradd had already finished it could have been reclaimed
   already.  This would only happen under heavy dependency pressure.
MFC r242734, 242815:

 - Implement BIO_FLUSH support around journal entries.  This will not 100%
   solve power loss problems with dishonest write caches.  However, it
   should improve the situation and force a full fsck when it is unable
   to resolve with the journal.
 - Resolve a case where the journal could wrap in an unsafe way causing
   us to prematurely lose journal entries in very specific scenarios.

 - Correct rev 242734, segments can sometimes get stuck.  Be a bit more
   defensive with segment state.
MFC r242924:

 - Fix a bug that has existed since the original softdep implementation.
   When a background copy of a cg is written we complete any work associated
   with that bmsafemap.  If new work has been added to the non-background
   copy of the buffer it will be completed before the next write happens.
   The solution is to do the rollbacks when we make the copy so only those
   dependencies that were present at the time of writing will be completed
   when the background write completes.  This would've resulted in various
   bitmap related corruptions and panics.  It also would've expired journal
   entries early causing journal replay to miss some records.
MFC r245133:
Only assign the environ in the startup code when environ is NULL.

Note that this is not the merge, but a reimplementation of the fix,
done for the not-consolidated code in the stable/9.
MFC r243017:

 - blk_equals() is too strict.  If the journal entry defines more frags
   than we're claiming it should still be considered an exact match.  This
   would previously leak frags that had been extended.
 - If there is a sequence number problem in the journal print the sequence
   numbers we've seen so far for debugging.
 - Clean up the block mask related debuging printfs.  Some are redundant.
MFC r243018:

 - Fix a truncation bug with softdep journaling that could leak blocks on
   crash.  When truncating a file that never made it to disk we use the
   canceled allocation dependencies to hold the journal records until
   the truncation completes.  Previously allocdirect dependencies on
   the id_bufwait list were not considered and their journal space
   could expire before the bitmaps were written.  Cancel them and attach
   them to the freeblks as we do for other allocdirects.
 - Add KTR traces that were used to debug this problem.
 - When adding jsegdeps, always use jwork_insert() so we don't have more
   than one segdep on a given jwork list.
MFC r240145:
- Simplify VM code by using vmspace_wired_count() for counting wired
memory of a process.

MFC r245255:
- Reduce kernel size by removing unnecessary pointer indirections.

GENERIC kernel size reduced in 16 bytes and RACCT kernel in 336 bytes.

MFC r245296:
- Improve readability of sys_obreak().

MFC r245421:
- Get rid of unused function vmspace_wired_count().
MFC r245458:
- Use standard RETURN VALUES section.
MFC r241402:
Add checks for ata_sata_scr_read() return statuses. It is mostly to silence
Clang Static Analyzer warnings as errors there are usually unlikely.
MFC r244146:
Add IDs for SATA controllers on AMD Hudson-2 series chipsets.
I am not exactly sure about the naming due to lack of specs on AMD site,
but it is better to have some identification then none at all.
MFC r245446:
In case somebody still use it, fix legacy ataraid(4) to work on combined
PATA+AHCI controllers, such as JMicron JMB363.

PR:		kern/159271
Merge r245841:
  posix_fadvise(2) first appeared in FreeBSD 9.1
MFC r239132:

Clone BIO_ORDERED flag, for disk drivers (namely CAM) that try to
 consume it.
MFC r245485:
  Add D-Link DFE-520TX rev C1.
MFC r245487:
  Add D-Link DFE-520TX (rev. C1) to HARDWARE section.
MFC r244481:
  For fiber PHYs, BRGPHY_MII_1000CTL register is not defined at all
  so do not touch it.
MFC r240252, r241541, r241543, r245756:

r240252: (eadler)
 - Remove documentation and www cvsup files as they are no longer
   useful with the switch to subversion.

r241541: (joel)
 - Minor mdoc improvements. Also remove unnecessary csup reference.

r241543: (eadler)
 - Bump .Dd

r245756:
 - Mark SUP_UPDATE as deprecated in make.conf(5), providing
   instructions to use SVN_UPDATE or freebsd-update(8).
 - While here, remove bogus NO_WWWUPDATE.
MFC r244482:
  Recognize 5720S PHY and treat it as 5708S PHY.
  Unfortunately 5720S uses 5709S PHY id so add a hack to detect 5720S
  PHY by checking parent device name.  5720S PHY does not support 2500SX.