aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-03-24 00:35:19 -0400
committerBrian Behlendorf <[email protected]>2018-03-23 21:35:19 -0700
commit157ef7f6a527239e3cb3afa3be2acf502794a5d4 (patch)
treef5b4335384f5288f0f86960e42f58e079bfcf078
parent387b6856d6d6997ae5849b8ad9155433fff6f077 (diff)
Don't count embedded bps in read stats
Currently, ZFS tracks statistics about calls to arc_read() via the /proc/spl/kstat/zfs/<pool>/reads file for debugging. Unfortunately, this file currently counts embedded bps as disk reads since they are technically processed by the ZIO layer. This pollutes the log since the ARC will never cache embedded bps. This patch corrects this issue by preventing the logging of embedded bp reads. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7334
-rw-r--r--module/zfs/arc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 9c0c5513d..350aafa1f 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -6346,7 +6346,9 @@ top:
}
out:
- spa_read_history_add(spa, zb, *arc_flags);
+ /* embedded bps don't actually go to disk */
+ if (!BP_IS_EMBEDDED(bp))
+ spa_read_history_add(spa, zb, *arc_flags);
return (rc);
}