X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fzfs_arc.c;h=f886c86a60151da3d44ee327974295a03d8e6c8e;hb=d19bcbf5c310f3656503e64ba26829256112ded4;hp=8341be0c306317aa21dac615a1c16f3b66611962;hpb=50c6b81549e3239034f71f00ff7dde4c6a8767e5;p=collectd.git diff --git a/src/zfs_arc.c b/src/zfs_arc.c index 8341be0c..f886c86a 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -26,7 +26,7 @@ /* * Global variables */ -static kstat_t *ksp; + extern kstat_ctl_t *kc; static void za_submit (const char* type, const char* type_instance, value_t* values, int values_len) @@ -88,6 +88,7 @@ static int za_read (void) prefetch_metadata_misses; gauge_t arc_hits, arc_misses, l2_hits, l2_misses; value_t l2_io[2]; + kstat_t *ksp = NULL; get_kstat (&ksp, "zfs", 0, "arcstats"); if (ksp == NULL) @@ -144,8 +145,6 @@ static int za_read (void) static int za_init (void) /* {{{ */ { - ksp = NULL; - /* kstats chain already opened by update_kstat (using *kc), verify everything went fine. */ if (kc == NULL) {