]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/falloc.h
fs: Add support FALLOC_FL_INSERT_RANGE for fallocate
[linux.git] / include / linux / falloc.h
index d39b824a780c2b48016e38370e36e039d192e90f..996111000a8c014556ff5997e609aeb28bd5ec1d 100644 (file)
@@ -1,11 +1,8 @@
 #ifndef _FALLOC_H_
 #define _FALLOC_H_
 
-#define FALLOC_FL_KEEP_SIZE    0x01 /* default is extend size */
-#define FALLOC_FL_PUNCH_HOLE   0x02 /* de-allocates range */
-#define FALLOC_FL_NO_HIDE_STALE        0x04 /* reserved codepoint */
+#include <uapi/linux/falloc.h>
 
-#ifdef __KERNEL__
 
 /*
  * Space reservation ioctls and argument structure
@@ -24,6 +21,10 @@ struct space_resv {
 #define FS_IOC_RESVSP          _IOW('X', 40, struct space_resv)
 #define FS_IOC_RESVSP64                _IOW('X', 42, struct space_resv)
 
-#endif /* __KERNEL__ */
+#define        FALLOC_FL_SUPPORTED_MASK        (FALLOC_FL_KEEP_SIZE |          \
+                                        FALLOC_FL_PUNCH_HOLE |         \
+                                        FALLOC_FL_COLLAPSE_RANGE |     \
+                                        FALLOC_FL_ZERO_RANGE |         \
+                                        FALLOC_FL_INSERT_RANGE)
 
 #endif /* _FALLOC_H_ */