Skip to content

Commit

Permalink
change bsize to frsize
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Aug 15, 2023
1 parent b43ee7c commit 5ec7e17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bob/src/hw_metrics_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ impl HWMetricsCollector {
let cm_p = Self::to_cpath(mount_point.as_path());
let stat = Self::statvfs_wrap(&cm_p);
if let Some(stat) = stat {
let bsize = stat.f_bsize;
let frsize = stat.f_frsize;
let blocks = stat.f_blocks;
let bavail = stat.f_bavail;
let bfree = stat.f_bfree;
res.insert(
disk_name.clone(),
DiskSpaceMetrics {
total_space: bsize * blocks,
used_space: bsize * bavail,
free_space: (blocks - bfree) * bsize,
total_space: frsize * blocks,
used_space: frsize * bavail,
free_space: (blocks - bfree) * frsize,
},
);
}
Expand Down

0 comments on commit 5ec7e17

Please sign in to comment.