Don't switch fm.c to NV_ENCODE_XDR
nvlist_size is being used to determine event memory use rather than to size a buffer and AFACT events never leave the kernel.
This commit is contained in:
parent
0ae142b640
commit
6cbd8f4289
|
@ -226,7 +226,7 @@ zfs_zevent_post(nvlist_t *nvl, nvlist_t *detector, zevent_cb_t *cb)
|
|||
goto out;
|
||||
}
|
||||
|
||||
error = nvlist_size(nvl, &nvl_size, NV_ENCODE_XDR);
|
||||
error = nvlist_size(nvl, &nvl_size, NV_ENCODE_NATIVE);
|
||||
if (error) {
|
||||
atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64);
|
||||
goto out;
|
||||
|
@ -337,7 +337,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
|
|||
}
|
||||
}
|
||||
|
||||
VERIFY(nvlist_size(ev->ev_nvl, &size, NV_ENCODE_XDR) == 0);
|
||||
VERIFY(nvlist_size(ev->ev_nvl, &size, NV_ENCODE_NATIVE) == 0);
|
||||
if (size > *event_size) {
|
||||
*event_size = size;
|
||||
error = ENOMEM;
|
||||
|
|
Loading…
Reference in New Issue