zfs_arc: 'stolen' was removed after FreeBSD 10.2
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 29 Feb 2016 21:16:49 +0000 (22:16 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 29 Feb 2016 21:16:49 +0000 (22:16 +0100)
Patch taken from FreeBSD port

src/zfs_arc.c

index 3a54ad8..65a50b4 100644 (file)
@@ -171,8 +171,11 @@ static int za_read (void)
        za_read_derive (ksp, "deleted",  "cache_operation", "deleted");
 #if __FreeBSD__
        za_read_derive (ksp, "allocated","cache_operation", "allocated");
+#if defined(__FreeBSD_version) && (__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 */
        za_read_derive (ksp, "mutex_miss", "mutex_operations", "miss");