]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zfs: cancel TRIM or initialize on FAULTED non-writeable vdevs
authorMartin Matuska <mm@FreeBSD.org>
Wed, 3 Mar 2021 01:38:09 +0000 (02:38 +0100)
committerMartin Matuska <mm@FreeBSD.org>
Sat, 6 Mar 2021 20:23:23 +0000 (21:23 +0100)
commiteed4d02d7ff7067259a23b7ccabc8c2253f1eff0
tree12262f9551f6e003a3bc28e5ba0988bbc6384202
parentd2faf2e6b2d43eafbae27a6d4909984c260e2631
zfs: cancel TRIM or initialize on FAULTED non-writeable vdevs

From the openzfs commit message:
  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.

Obtained from: openzfs/zfs@bedbc13daa6dfe9e0221bfadb8d8db2378deaacc
Approved by: re (delphij)

(cherry picked from commit dc2743434f6cc73ca8ec1d551aba03a678eac804)
sys/contrib/openzfs/module/zfs/vdev_initialize.c
sys/contrib/openzfs/module/zfs/vdev_trim.c
sys/contrib/openzfs/tests/runfiles/common.run
sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am
sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_fault_export_import_online.ksh [new file with mode: 0755]
sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am
sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_fault_export_import_online.ksh [new file with mode: 0755]