From e242b67cee1dbaf09a27e7c78c55c5505ac88ff4 Mon Sep 17 00:00:00 2001 From: Igor K Date: Tue, 3 Sep 2019 22:12:31 +0300 Subject: [PATCH] Fix panic on DilOS with kstat per dataset statistics Account for ZFS_MAX_DATASET_NAME_LEN in kstat data size. This value is ignored in the Linux kstat code but resolves the issue for other platforms. Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Brian Behlendorf Signed-off-by: Igor Kozhukhov Closes #9254 Closes #9151 --- module/zfs/dataset_kstats.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/zfs/dataset_kstats.c b/module/zfs/dataset_kstats.c index 522825c42..e46a0926d 100644 --- a/module/zfs/dataset_kstats.c +++ b/module/zfs/dataset_kstats.c @@ -135,6 +135,7 @@ dataset_kstats_create(dataset_kstats_t *dk, objset_t *objset) kstat->ks_data = dk_kstats; kstat->ks_update = dataset_kstats_update; kstat->ks_private = dk; + kstat->ks_data_size += ZFS_MAX_DATASET_NAME_LEN; kstat_install(kstat); dk->dk_kstats = kstat; -- 2.40.0