You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Above variables and struct members are 64-bit (signed) derive_t values, whereas UINT_MAX is 32-bit (unsigned) value.
According to kernel documentation, values read from /proc/diskstats are unsigned long (native word size) numbers, i.e. UINT_MAX is correct only for 32-bit platforms: https://www.kernel.org/doc/Documentation/iostats.txt
(Whereas most machines today are running 64-bit Linux.)
Steps to reproduce
grep UINT_MAX src/disk.c
Expected output
Correct max value used in wrap up calculations.
Actual output
Both v5 (
main
) and v6 (collectd-6.0
) HEAD give:Bug description
Above variables and struct members are 64-bit (signed)
derive_t
values, whereasUINT_MAX
is 32-bit (unsigned) value.According to kernel documentation, values read from
/proc/diskstats
are unsigned long (native word size) numbers, i.e.UINT_MAX
is correct only for 32-bit platforms: https://www.kernel.org/doc/Documentation/iostats.txt(Whereas most machines today are running 64-bit Linux.)
Noticed while reviewing #4217.
The text was updated successfully, but these errors were encountered: