summaryrefslogtreecommitdiff
path: root/ltp
diff options
context:
space:
mode:
Diffstat (limited to 'ltp')
-rw-r--r--ltp/fsx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ltp/fsx.c b/ltp/fsx.c
index 02403720..9d598a4f 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1200,6 +1200,9 @@ do_zero_range(unsigned offset, unsigned length, int keep_size)
unsigned end_offset;
int mode = FALLOC_FL_ZERO_RANGE;
+ if (keep_size)
+ mode |= FALLOC_FL_KEEP_SIZE;
+
if (length == 0) {
if (!quiet && testcalls > simulatedopcount)
prt("skipping zero length zero range\n");