From 965115a9ec6d4beaea5c6c1483176b80445c5f96 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Fri, 9 Aug 2019 22:08:29 +0200 Subject: [PATCH] zfs_arc: Read dbuf_size, dnode_size and bonus_size They are the replacement for other_size since ZFS on Linux 0.7.0 --- src/zfs_arc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/zfs_arc.c b/src/zfs_arc.c index be93b9db..33646977 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -268,10 +268,17 @@ static int za_read(void) { za_read_gauge(ksp, "mfu_size", "cache_size", "mfu_size"); za_read_gauge(ksp, "mru_ghost_size", "cache_size", "mru_ghost_size"); za_read_gauge(ksp, "mru_size", "cache_size", "mru_size"); - za_read_gauge(ksp, "other_size", "cache_size", "other_size"); za_read_gauge(ksp, "p", "cache_size", "p"); za_read_gauge(ksp, "size", "cache_size", "arc"); + /* The "other_size" value was replaced by more specific values in ZFS on Linux + * version 0.7.0 (commit 25458cb) + */ + if (za_read_gauge(ksp, "dbuf_size", "cache_size", "dbuf_size") != 0 || + za_read_gauge(ksp, "dnode_size", "cache_size", "dnode_size") != 0 || + za_read_gauge(ksp, "bonus_size", "cache_size", "bonus_size") != 0) + za_read_gauge(ksp, "other_size", "cache_size", "other_size"); + /* The "l2_size" value has disappeared from Solaris some time in * early 2013, and has only reappeared recently in Solaris 11.2. * Stop trying if we ever fail to read it, so we don't spam the log. -- 2.11.0