aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2023-07-21 11:46:58 -0700
committerGitHub <[email protected]>2023-07-21 11:46:58 -0700
commitab0b0393cbd7f7672df31d633b052216bbcd1b30 (patch)
tree73298653523a3abda04fd7e80da5b7a5233f6420 /cmd
parent2d8a2b51dcc0066f73819e903609daa02a439f51 (diff)
zed: Fix zed ASSERT on slot power cycle
We would see zed assert on one of our systems if we powered off a slot. Further examination showed zfs_retire_recv() was reporting a GUID of 0, which in turn would return a NULL nvlist. Add in a check for a zero GUID. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #15084
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zed/agents/zfs_retire.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/zed/agents/zfs_retire.c b/cmd/zed/agents/zfs_retire.c
index f83ae0925..a0e377a4a 100644
--- a/cmd/zed/agents/zfs_retire.c
+++ b/cmd/zed/agents/zfs_retire.c
@@ -416,6 +416,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
FM_EREPORT_PAYLOAD_ZFS_VDEV_GUID, &vdev_guid) != 0)
return;
+ if (vdev_guid == 0) {
+ fmd_hdl_debug(hdl, "Got a zero GUID");
+ return;
+ }
+
if (spare) {
int nspares = find_and_remove_spares(zhdl, vdev_guid);
fmd_hdl_debug(hdl, "%d spares removed", nspares);