diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2021-01-07 23:19:59 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2021-01-07 23:19:59 +0000 |
commit | 42385c279bad198701badabdab661df49f2acb9a (patch) | |
tree | 529931aeb217bb13f5cbfb4eb38fd75163d251ba /cmd/zed/agents/zfs_mod.c | |
parent | 0be360124f8f108f73365e31448e7550f877f3ac (diff) | |
download | src-a82985c9a676ab7cbee16df211e356a4535f7792.tar.gz src-a82985c9a676ab7cbee16df211e356a4535f7792.zip |
Update OpenZFS to master-f11b09vendor/openzfs/20210107
Diffstat (limited to 'cmd/zed/agents/zfs_mod.c')
-rw-r--r-- | cmd/zed/agents/zfs_mod.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/zed/agents/zfs_mod.c b/cmd/zed/agents/zfs_mod.c index 8190beb0c9e7..4a58e1f1dbd3 100644 --- a/cmd/zed/agents/zfs_mod.c +++ b/cmd/zed/agents/zfs_mod.c @@ -435,7 +435,15 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled) return; } - ret = zpool_vdev_attach(zhp, fullpath, path, nvroot, B_TRUE, B_FALSE); + /* + * Prefer sequential resilvering when supported (mirrors and dRAID), + * otherwise fallback to a traditional healing resilver. + */ + ret = zpool_vdev_attach(zhp, fullpath, path, nvroot, B_TRUE, B_TRUE); + if (ret != 0) { + ret = zpool_vdev_attach(zhp, fullpath, path, nvroot, + B_TRUE, B_FALSE); + } zed_log_msg(LOG_INFO, " zpool_vdev_replace: %s with %s (%s)", fullpath, path, (ret == 0) ? "no errors" : |