mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Accumulate ReadCount and WriteCount into 64-bit count in devstat
This commit is contained in:
parent
caeb3a9d1b
commit
a8ffcec127
1 changed files with 3 additions and 1 deletions
|
|
@ -895,7 +895,9 @@ static int devstat(uint64_t device, const char* name, const char* wfile, uint64_
|
|||
return -1;
|
||||
}
|
||||
|
||||
*count = ds.ReadCount + ds.WriteCount;
|
||||
/* accumulate in 64-bit to avoid 32-bit overflow when adding the two DWORD counters */
|
||||
*count = ds.ReadCount;
|
||||
*count += ds.WriteCount;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue