On Thu, Feb 23, 2012 at 9:39 PM, Avleen Vig <939...@bugs.launchpad.net> wrote: > Nothing else at all accesses those files, which is one of the things that > concerned me the most :-/ > It looks like it call came from the same place.
It's possible to check the file descriptor flags using /proc/$PID/fdinfo/$FD. So for example, you could find the qemu-kvm process and list its open file descriptors using ls -l /proc/$(pgrep qemu-kvm)/fd. Find the file descriptor to the image file and look up its flags in /proc/$PID/fdinfo/$FD. If the file descriptor has bit 040000 set then it is O_DIRECT. If not, it uses buffered I/O. Using this technique you could determine whether or not your system is accessing the file using both direct and buffered I/O. It would also tell you which processes are doing this. Stefan