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:
Brooks Davis 2022-11-18 00:47:05 +00:00
parent 0ae142b640
commit 6cbd8f4289
1 changed files with 2 additions and 2 deletions

View File

@ -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;