From 96ac0e5d76db3714b7c8d37956f6e6b1d804a01a Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Sun, 22 Apr 2012 18:49:35 -0700 Subject: Add FALLOCATE operation fallocate filesystem operation preallocates media space for the given file. If fallocate returns success then any subsequent write to the given range never fails with 'not enough space' error. --- include/fuse_lowlevel.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/fuse_lowlevel.h') diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 3ecc46e..2036717 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -996,6 +996,26 @@ struct fuse_lowlevel_ops { */ void (*flock) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, int op); + + /** + * Allocate requested space. If this function returns success then + * subsequent writes to the specified range shall not fail due to the lack + * of free space on the file system storage media. + * + * Introduced in version 2.9 + * + * Valid replies: + * fuse_reply_err + * + * @param req request handle + * @param ino the inode number + * @param offset starting point for allocated region + * @param length size of allocated region + * @param mode determines the operation to be performed on the given range, + * see fallocate(2) + */ + void (*fallocate) (fuse_req_t req, fuse_ino_t ino, int mode, + off_t offset, off_t length, struct fuse_file_info *fi); }; /** -- cgit v1.2.3