X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fzfs_arc.c;h=c7d782c6370c7d308d1ad56ed63f942e3db5bec5;hb=db961f476426f5dd3ca1663ffc094f0fc7f6f8a2;hp=c5493d83a60b01ddef68e52eba84c6805106f25d;hpb=4103105fb43cd72294f165b2541540b3a8a99532;p=collectd.git diff --git a/src/zfs_arc.c b/src/zfs_arc.c index c5493d83..c7d782c6 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -90,12 +90,10 @@ static long long get_zfs_value(kstat_t *ksp, const char *key) static void free_zfs_values (kstat_t *ksp) { - llentry_t *e; - if (ksp == NULL) return; - for (e = llist_head (ksp); e != NULL; e = e->next) + for (llentry_t *e = llist_head (ksp); e != NULL; e = e->next) { sfree (e->key); sfree (e->value); @@ -296,10 +294,6 @@ static int za_read (void) za_read_derive (ksp, "deleted", "cache_operation", "deleted"); #if defined(KERNEL_FREEBSD) za_read_derive (ksp, "allocated","cache_operation", "allocated"); -#if __FreeBSD_version < 1002501 - /* stolen removed from sysctl kstat.zfs.misc.arcstats on FreeBSD 10.2+ */ - za_read_derive (ksp, "stolen", "cache_operation", "stolen"); -#endif #endif /* Issue indicators */ @@ -325,7 +319,6 @@ static int za_read (void) za_read_derive (ksp, "mfu_ghost_hits", "cache_result", "mfu_ghost-hit"); za_read_derive (ksp, "mru_hits", "cache_result", "mru-hit"); za_read_derive (ksp, "mru_ghost_hits", "cache_result", "mru_ghost-hit"); - za_read_derive (ksp, "prefetch_metadata_misses", "cache_result", "prefetch_metadata-miss"); /* Ratios */ arc_hits = (gauge_t) get_zfs_value(ksp, "hits");