From 6cbd8f4289bbc406531845cfe4f838162b1303b9 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 18 Nov 2022 00:47:05 +0000 Subject: [PATCH] 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. --- module/zfs/fm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/fm.c b/module/zfs/fm.c index bf8458b768..3f05d75977 100644 --- a/module/zfs/fm.c +++ b/module/zfs/fm.c @@ -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;