Code

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 3a54ad8d57d92c97a6ef9b2050c8b68e02fef682..65a50b4e0986b6fc92a123b1dedeaf2cf0484f2c 100644 (file)
@@ -171,7 +171,10 @@ 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 */