[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71191: od does unnecessary reads instead of seeking
From: |
Joseph C. Sible |
Subject: |
bug#71191: od does unnecessary reads instead of seeking |
Date: |
Sat, 25 May 2024 03:05:06 -0400 |
Consider running the following command, for looking at the pagemap
bits of a given memory page:
od -t x8 -N 8 -j 34359738368 /proc/PID/pagemap
That file supports seeking, but od will unnecessarily read and discard
32GB worth of data instead of doing so.
Looking at the skip function in od.c, it looks like this happens
because the file has a bogus st_size of 0 (as is typical for files in
/proc) despite usable_st_size returning true for it, which results in
the calls to fseeko never even being tried.
- bug#71191: od does unnecessary reads instead of seeking,
Joseph C. Sible <=