blob: 674d59f4d6ce581b8c713ab1615e6de7b096ca8c [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Amit Arora97ac7352007-07-17 21:42:44 -04002#ifndef _FALLOC_H_
3#define _FALLOC_H_
4
David Howells607ca462012-10-13 10:46:48 +01005#include <uapi/linux/falloc.h>
Amit Arora97ac7352007-07-17 21:42:44 -04006
Ankit Jain3e63cbb2009-06-19 14:28:07 -04007
8/*
9 * Space reservation ioctls and argument structure
10 * are designed to be compatible with the legacy XFS ioctls.
11 */
12struct space_resv {
13 __s16 l_type;
14 __s16 l_whence;
15 __s64 l_start;
16 __s64 l_len; /* len == 0 means until end of file */
17 __s32 l_sysid;
18 __u32 l_pid;
19 __s32 l_pad[4]; /* reserved area */
20};
21
22#define FS_IOC_RESVSP _IOW('X', 40, struct space_resv)
23#define FS_IOC_RESVSP64 _IOW('X', 42, struct space_resv)
24
Namjae Jeondd46c782015-03-25 15:07:05 +110025#define FALLOC_FL_SUPPORTED_MASK (FALLOC_FL_KEEP_SIZE | \
26 FALLOC_FL_PUNCH_HOLE | \
27 FALLOC_FL_COLLAPSE_RANGE | \
28 FALLOC_FL_ZERO_RANGE | \
Darrick J. Wong71be6b42016-10-03 09:11:14 -070029 FALLOC_FL_INSERT_RANGE | \
30 FALLOC_FL_UNSHARE_RANGE)
Namjae Jeondd46c782015-03-25 15:07:05 +110031
Amit Arora97ac7352007-07-17 21:42:44 -040032#endif /* _FALLOC_H_ */