diff --git a/cmd/zfs_object_agent/zettaobject/src/access_stats.rs b/cmd/zfs_object_agent/zettaobject/src/access_stats.rs index 4604f7a86b40..446a23b96f24 100644 --- a/cmd/zfs_object_agent/zettaobject/src/access_stats.rs +++ b/cmd/zfs_object_agent/zettaobject/src/access_stats.rs @@ -122,7 +122,7 @@ impl<'a> OpInProgress<'a> { // This bucket mapping is equivalent to L_HISTO() macro in zfs.h let latency_bucket = std::cmp::min( - latency.next_power_of_two().trailing_zeros(), + latency.next_power_of_two().trailing_zeros() - 1, LATENCY_HISTOGRAM_BUCKETS - 1, ) as usize;