Skip to content

Commit d748db4

Browse files
committed
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. Signed-off-by: Tony Hutter <[email protected]>
1 parent 2d8a2b5 commit d748db4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/zed/agents/zfs_retire.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
416416
FM_EREPORT_PAYLOAD_ZFS_VDEV_GUID, &vdev_guid) != 0)
417417
return;
418418

419+
if (vdev_guid == 0) {
420+
fmd_hdl_debug(hdl, "Got a zero GUID");
421+
return;
422+
}
423+
419424
if (spare) {
420425
int nspares = find_and_remove_spares(zhdl, vdev_guid);
421426
fmd_hdl_debug(hdl, "%d spares removed", nspares);

0 commit comments

Comments
 (0)