diff options
author | Max Reitz <mreitz@redhat.com> | 2014-05-08 20:57:55 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-05-09 20:57:32 +0200 |
commit | 4f11aa8a40351b28c0e67c7276e0003b38cc46ac (patch) | |
tree | aa252335b23db6769a12fcc2e7466d54daaf2bf0 /user-exec.c | |
parent | 4557117d9eed8cadc360aec23b42fc39a7011864 (diff) |
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 'user-exec.c')
0 files changed, 0 insertions, 0 deletions