diff options
author | loli10K <[email protected]> | 2018-09-18 23:45:52 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-11-09 11:17:24 -0800 |
commit | d48091de81e5eab2aa32d7a52db4f147bd813523 (patch) | |
tree | afb0974ccc0d02287e4734d3142a900b6959758c /include | |
parent | 13c59bb76b2f56db9f3ff6597d8a865347158e2c (diff) |
zed: detect and offline physically removed devices
This commit adds a new test case to the ZFS Test Suite to verify ZED
can detect when a device is physically removed from a running system:
the device will be offlined if a spare is not available in the pool.
We implement this by using the existing libudev functionality and
without relying solely on the FM kernel module capabilities which have
been observed to be unreliable with some kernels.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Don Brady <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #1537
Closes #7926
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/fs/zfs.h | 1 | ||||
-rw-r--r-- | include/sys/vdev_impl.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 05b7685f5..85512618c 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -720,6 +720,7 @@ typedef struct zpool_load_policy { #define ZPOOL_CONFIG_MMP_HOSTNAME "mmp_hostname" /* not stored on disk */ #define ZPOOL_CONFIG_MMP_HOSTID "mmp_hostid" /* not stored on disk */ #define ZPOOL_CONFIG_ALLOCATION_BIAS "alloc_bias" /* not stored on disk */ +#define ZPOOL_CONFIG_EXPANSION_TIME "expansion_time" /* not stored */ /* * The persistent vdev state is stored as separate values rather than a single diff --git a/include/sys/vdev_impl.h b/include/sys/vdev_impl.h index 7b07fe6c1..6c13a548f 100644 --- a/include/sys/vdev_impl.h +++ b/include/sys/vdev_impl.h @@ -344,6 +344,7 @@ struct vdev { uint64_t vdev_leaf_zap; hrtime_t vdev_mmp_pending; /* 0 if write finished */ uint64_t vdev_mmp_kstat_id; /* to find kstat entry */ + uint64_t vdev_expansion_time; /* vdev's last expansion time */ /* * For DTrace to work in userland (libzpool) context, these fields must |