Add option to disable the "No ???.today" periodic messages (first run).
https://bugs.freenas.org/issues/3799
Merge branch 'periodic' of https://github.com/dlacko/trueos into feature/unified_freebsd
Make comcosole options set before its activation to be remembered.
MFC r249194 (by trasz):
Make SYNCHRONIZE CACHE work with LUNs backed by device files (as opposed
to regular files, which already worked fine).  With this change, it's no
longer neccessary to use "ctladm realsync off" workaround.

(cherry picked from commit 4bd7a45db17b657df1b4929c4244148d35e1245b)
MFC 244015:
  ------------------------------------------------------------------------
  r244015 | ken | 2012-12-07 21:16:07 -0700 (Fri, 07 Dec 2012) | 17 lines

  Fix the CTL OOA queue dumping code so that it does not hold a mutex
  while doing a copyout.  That can cause a panic, because copyout
  can trigger VM faults, and we can't handle VM faults while holding
  a mutex.

  The solution here is to malloc a separate buffer to hold the OOA
  queue entries, so that we don't risk a VM fault while filling up
  the buffer and we don't have to drop the lock.  The other solution
  would be to wire the user's memory while filling their buffer with
  copyout, but that would have been a little more complex.

  Also fix a debugging parenthesis issue in ctl_abort_task() pointed
  out by Chuck Tuffli.

  Sponsored by:   Spectra Logic Corporation

(cherry picked from commit d6db3bc7e3edd193173f9063f77ca80337df8543)
MFC r249102 (by trasz):
Since the CTL version in FreeBSD does not support High Availability,
ctl_is_single should always be set to 1.  Make it so.  Previously
it was always 0, because ctl_isc_start() never got to run.

(cherry picked from commit 70702718ec0e97970a6171e2ee00c1eaa2017100)
MFC r249256 (by ken):
Fix a memory leak that showed up when we delete LUNs.  The memory used for
the LUN was never freed.

ctl.c:          Adjust ctl_alloc_lun() to make sure we don't clear the
                CTL_LUN_MALLOCED flag.

(cherry picked from commit 0eee89721d2f463bfe461eba2fdbfb7ee8f98d16)
MFC r250131 (by eadler):
Correct a few sizeof()s

(cherry picked from commit 5c19171c428b7fee04c4c0b5cd10ac3a46adc44e)
MFC r250460 (by eadler):
Fix a bunch of typos.

(cherry picked from commit 6c5fbc74897e65079596e3cfbe3a6f6e5f73c061)
MFC r249065 (by trasz):
Fix locking problem in ctl_maintenance_in() - one cannot use M_WAITOK or call
ctl_done() with mutex held.

(cherry picked from commit 4ed71a60c8a4028d98038d31e4dcf7d71b88f473)
MFC r256533:
Unhide "Serial Number" lines from bootverbose.  That information may
be useful for system administration to have in hard copy (in logs) if
one of several devices suddenly dies.

(cherry picked from commit 91f2b96b201c5c579f6681cb35cbc90d6d079c4a)
MFC r256552:
Unify periph invalidation and destruction reporting.
Print message containing device model and serial number on invalidation.

(cherry picked from commit 690b084ad09c2abcca3ee315fe51ebf288ad36e5)
MFC r249981:
Remove ADA_FLAG_PACK_INVALID flag. Since ATA disks have no concept of media
change it only duplicates CAM_PERIPH_INVALID flag, so we can use last one.

Slightly cleanup DA_FLAG_PACK_INVALID use.

(cherry picked from commit 5cdd91fa7059241efc1abaa246019b0d29963220)
MFC r253752:
Fix returning incorrect bio_resid value with failed BIO_DELETE requests.
Neither residual length reported for ATA/SCSI command nor one from another
BIO_DELETE request are in any way related to the value to be returned.

(cherry picked from commit 0d8d3361c0c23999f39ae504544b18940f2d3aa2)
MFC r254329 (by smh):
Added 4K quirks for:-
* OCZ Agility 2 SSDs
* Marvell SSDs
* Intel X25-M Series SSDs

(cherry picked from commit b5e19728de7b316946121f13e0e29413eb16f4c6)
MFC r256836:
Remove hard limit on number of BIOs handled with one ATA TRIM request.

(cherry picked from commit e80894dbb55bbb5a2c1a727b0a5f63aa558919f0)
MFC r257054:
Some microoptimizations for da and ada drivers:
 - Replace ordered_tag_count counter with single flag;
 - From da remove outstanding_cmds counter, duplicating pending_ccbs list;
 - From da_softc remove unused links field.

(cherry picked from commit dbd6a194bff45295cf0d8802dddf89ac601829c3)
MFC r249466, r249481, r250025:
Remove multilevel freezing mechanism, implemented to handle specifics of
the ATA/SATA error recovery, when post-reset recovery commands should be
allocated when queues are already full of payload requests.  Instead of
removing frozen CCBs with specified range of priorities from the queue
to provide free openings, use simple hack, allowing explicit CCBs over-
allocation for requests with priority higher (numerically lower) then
CAM_PRIORITY_OOB threshold.

Simplify CCB allocation logic by removing SIM-level allocation queue.
After that SIM-level queue manages only CCBs execution, while allocation
logic is localized within each single device.

(cherry picked from commit 8ccbee2edf83fac8f0acf8f76c6848641bd27bce)
MFC r249438:
Use full freeze while PMP does hard reset. This is only cosmetical change.

(cherry picked from commit 3bda598ca61a45abb2b4b640dd4eb9c4d8dc5267)
MFC r253958:
Change CCB queue resize logic to be able safely handle overallocations:
 - (re)allocate queue space in power of 2 chunks with 64 elements minimum
and never shrink it; with only 4/8 bytes per element size is insignificant.
 - automatically reallocate the queue to double size if it is overflowed.
 - if queue reallocation failed, store extra CCBs in unsorted TAILQ,
fetching them back as soon as some queue element is freed.

To free space in CCB for TAILQ linking, change highpowerq from keeping
high-power CCBs to keeping devices frozen due to high-power CCBs.

This encloses all pieces of queue resize logic inside of cam_queue.[ch],
removing some not obvious duties from xpt_release_ccb().

(cherry picked from commit a53cdc73b54c41ac4f73b39125b61ac7e4d1b796)