Skip to content

Commit a849cfc

Browse files
tonyhutterdefaziogiancarlo
authored andcommitted
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 openzfs#15084 Signed-off-by: Gian-Carlo DeFazio <[email protected]> (cherry-picked from commit ab0b039)
1 parent 43806e7 commit a849cfc

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
@@ -415,6 +415,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
415415
FM_EREPORT_PAYLOAD_ZFS_VDEV_GUID, &vdev_guid) != 0)
416416
return;
417417

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

0 commit comments

Comments
 (0)