Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 32-bit overflows in disk utilization stats #1641

Merged
merged 2 commits into from
Oct 6, 2023

Commits on Oct 5, 2023

  1. Change memcpy() calls to assignments

    This is to avoid triggering a spurious warning caused by [1], which
    is triggered by the next commit in chain (unrelated change in
    update_io_tick_disk()).
    
    [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111696
    
    Signed-off-by: Alexey Neyman <aneyman@google.com>
    stilor committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    4b3d7ff View commit details
    Browse the repository at this point in the history
  2. Handle 32-bit overflows in disk utilization stats

    Linux prints [1] some of the values reported in block device's `stat`
    sysfs file as 32-bit unsigned integers. fio interprets them as 64-bit
    integers when reading that sysfs file and performs further arithmetics
    on them in 64-bits. If the reported value overflows during fio run,
    a huge bogus value is reported in the "disk utilization" block instead.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/block/genhd.c#n962
    
    Signed-off-by: Alexey Neyman <aneyman@google.com>
    stilor committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    5f7bd35 View commit details
    Browse the repository at this point in the history