summary refs log tree commit diff stats
path: root/scripts/simpletrace.py
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-05-08 20:57:55 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-05-09 20:57:32 +0200
commit4f11aa8a40351b28c0e67c7276e0003b38cc46ac (patch)
treeaa252335b23db6769a12fcc2e7466d54daaf2bf0 /scripts/simpletrace.py
parent4557117d9eed8cadc360aec23b42fc39a7011864 (diff)
downloadfocaccia-qemu-4f11aa8a40351b28c0e67c7276e0003b38cc46ac.tar.gz
focaccia-qemu-4f11aa8a40351b28c0e67c7276e0003b38cc46ac.zip
block/raw-posix: Try both FIEMAP and SEEK_HOLE
The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if
FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even
compiled in in this case. However, there may be implementations which
support the latter but not the former (e.g., NFSv4.2) as well as vice
versa.

To cover both cases, try FIEMAP first (as this will return -ENOTSUP if
not supported instead of returning a failsafe value (everything
allocated as a single extent)) and if that does not work, fall back to
SEEK_HOLE/SEEK_DATA.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/simpletrace.py')
0 files changed, 0 insertions, 0 deletions