crosvm/sys_util
Daniel Verkamp abbe0c8cf0 sys_util: use PUNCH_HOLE to implement write_zeroes
Some filesystems do not support FALLOC_FL_ZERO_RANGE; in particular,
encrypted files on ext4 fail this request with -EOPNOTSUPP.  Use
fallocate with FALLOC_FL_PUNCH_HOLE instead, which is more widely
supported.

BUG=None
TEST=strace crosvm using qcow files on encrypted ext4 and verify that
     fallocate(FALLOC_FL_PUNCH_HOLE) is issued when required.

Change-Id: Idffabc75ea0e1153efbb13cec8b4a25570427235
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1250022
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2018-10-13 14:55:24 -07:00
..
poll_token_derive rustfmt wire_format_derive and poll_token_derive 2018-10-10 17:07:51 -07:00
src sys_util: use PUNCH_HOLE to implement write_zeroes 2018-10-13 14:55:24 -07:00
Cargo.toml sys_util: remove Scm struct and sock_ctrl_msg C library 2018-09-17 21:34:50 -07:00