Whamcloud - gitweb
LU-13397 llite: support fallocate() on selected mirror
[fs/lustre-release.git] / lustre / utils / liblustreapi_lseek.c
index cd3f008..9073999 100644 (file)
@@ -127,7 +127,8 @@ int llapi_hole_punch(int fd, off_t start, size_t length)
 {
        int rc;
 
-       rc = fallocate(fd, FALLOC_FL_PUNCH_HOLE, start, length);
+       rc = fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
+                      start, length);
        if (rc)
                rc = -errno;
        return rc;