mirror of https://github.com/aristocratos/btop.git
fixed bug where updated disks stats overrided disk io data
This commit is contained in:
parent
9b4e85f08d
commit
cdcf8bc929
|
@ -147,7 +147,6 @@ namespace Mem {
|
|||
int64_t free{}; // defaults to 0
|
||||
int used_percent{}; // defaults to 0
|
||||
int free_percent{}; // defaults to 0
|
||||
bool is_ready = false;
|
||||
|
||||
array<int64_t, 3> old_io = {0, 0, 0};
|
||||
deque<long long> io_read = {};
|
||||
|
|
|
@ -1111,7 +1111,6 @@ namespace Mem {
|
|||
disk.used = updated_stats.used;
|
||||
disk.used_percent = updated_stats.used_percent;
|
||||
disk.free_percent = updated_stats.free_percent;
|
||||
disk.is_ready = true;
|
||||
}
|
||||
disks_stats_promises[mountpoint] = async(std::launch::async, [mountpoint, &free_priv]() -> pair<disk_info, int> {
|
||||
struct statvfs vfs;
|
||||
|
@ -1156,7 +1155,6 @@ namespace Mem {
|
|||
int64_t sectors_read, sectors_write, io_ticks, io_ticks_temp;
|
||||
disk_ios = 0;
|
||||
for (auto& [ignored, disk] : disks) {
|
||||
if(!disk.is_ready) continue;
|
||||
if (disk.stat.empty() or access(disk.stat.c_str(), R_OK) != 0) continue;
|
||||
if (disk.fstype == "zfs" && zfs_hide_datasets && zfs_collect_pool_total_stats(disk)) {
|
||||
disk_ios++;
|
||||
|
|
Loading…
Reference in New Issue