Skip to content

Commit

Permalink
zed: Fix zed ASSERT on slot power cycle
Browse files Browse the repository at this point in the history
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 <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes openzfs#15084
  • Loading branch information
tonyhutter authored and behlendorf committed Jul 21, 2023
1 parent e01e3a4 commit 9588581
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/zed/agents/zfs_retire.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,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);
Expand Down

0 comments on commit 9588581

Please sign in to comment.