Bring over illumos ZFS FMA logic -- phase 1

This first phase brings over the ZFS SLM module, zfs_mod.c, to handle
auto operations in response to disk events. Disk event monitoring is
provided from libudev and generates the expected payload schema for
zfs_mod. This work leverages the recently added devid and phys_path
strings in the vdev label.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@intel.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #4673
This commit is contained in:
Don Brady
2016-08-31 15:46:58 -06:00
committed by Brian Behlendorf
parent 0b284702b7
commit d02ca37979
20 changed files with 1837 additions and 39 deletions
+3 -3
View File
@@ -579,10 +579,10 @@ test_9() {
${ZFS} create -V 300M ${FULL_NAME} || fail 3
udev_trigger
# Dump the events, there should be at least 5 lines.
# Dump the events, there should be a pool create event
${ZPOOL} events >${TMP_EVENTS} || fail 4
EVENTS=`wc -l ${TMP_EVENTS} | cut -f1 -d' '`
[ $EVENTS -lt 5 ] && fail 5
MATCHES=`grep -c sysevent\.fs\.zfs\.pool_create ${TMP_EVENTS}`
[ $MATCHES -eq 1 ] || fail 5
# Clear the events and ensure there are none.
${ZPOOL} events -c >/dev/null || fail 6