Skip to content

Commit eddef4d

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 it returning a zfs_retire_recv() with a GUID of 0, which in turn would return a NULL nvlist. Add in a check for a NULL nvlist go get around this. Signed-off-by: Tony Hutter <[email protected]>
1 parent 2d8a2b5 commit eddef4d

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
@@ -430,6 +430,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
430430
&vdev)) == NULL)
431431
return;
432432

433+
if (vdev == NULL) {
434+
fmd_hdl_debug(hdl, "No vdev nvlist for guid %llu\n", vdev_guid);
435+
return;
436+
}
437+
433438
devname = zpool_vdev_name(NULL, zhp, vdev, B_FALSE);
434439

435440
nvlist_lookup_uint64_array(vdev, ZPOOL_CONFIG_VDEV_STATS,

0 commit comments

Comments
 (0)