HardenedBSD/src bedbc13module/zfs vdev_trim.c vdev_initialize.c, tests/runfiles common.run

Cancel TRIM / initialize on FAULTED non-writeable vdevs

When a device which is actively trimming or initializing becomes
FAULTED, and therefore no longer writable, cancel the active
TRIM or initialization.  When the device is merely taken offline
with `zpool offline` then stop the operation but do not cancel it.
When the device is brought back online the operation will be
resumed if possible.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Co-authored-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Co-authored-by: Vipin Kumar Verma <vipin.verma at hpe.com>
Signed-off-by: Srikanth N S <srikanth.nagasubbaraoseetharaman at hpe.com>
Closes #11588 
DeltaFile
+62-0tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_fault_export_import_online.ksh
+59-0tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_fault_export_import_online.ksh
+11-4module/zfs/vdev_trim.c
+8-2module/zfs/vdev_initialize.c
+2-0tests/runfiles/common.run
+1-0tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am
+1-0tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am
+144-67 files

UnifiedSplitRaw