In the guest, we really need to open the metrics disk with the O_DIRECT option. Otherwise the guest kernel will cache arbitrary parts of the disk, and won't notice when the host updates it. Now the problem with O_DIRECT is it introduces undetermined restrictions on how you can read from the underlying device. In particular, all read(2) calls must be made with: (a) Buffer must be aligned to a block size. (b) Current file offset must be aligned to a block size. (c) Requested read size must be a multiple of block size. That's quite difficult, but there's a further restriction: There's no reliable way to know what the "block size" is! This patch changes the reads to use O_DIRECT and satisfies the alignment restrictions above, except that we choose an arbitrary block size (64K) which is hopefully large enough to cover any real cases. (Note that this also implies that the minimum size of the metrics disk will be 64K -- currently the default is 256K so we're OK unless a sysadmin reduces the default). Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/