diff options
author | Tom Caputi <[email protected]> | 2018-03-24 00:35:19 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-03-23 21:35:19 -0700 |
commit | 157ef7f6a527239e3cb3afa3be2acf502794a5d4 (patch) | |
tree | f5b4335384f5288f0f86960e42f58e079bfcf078 /module/zfs/arc.c | |
parent | 387b6856d6d6997ae5849b8ad9155433fff6f077 (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
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r-- | module/zfs/arc.c | 4 |
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); } |