diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/falloc.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/falloc.h | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/falloc.h b/include/linux/falloc.h index f3f0b97b1675..b47aae9e487a 100644 --- a/include/linux/falloc.h +++ b/include/linux/falloc.h @@ -30,7 +30,8 @@ struct space_resv { FALLOC_FL_COLLAPSE_RANGE | \ FALLOC_FL_ZERO_RANGE | \ FALLOC_FL_INSERT_RANGE | \ - FALLOC_FL_UNSHARE_RANGE) + FALLOC_FL_UNSHARE_RANGE | \ + FALLOC_FL_MAP_FREE_SPACE) /* on ia32 l_start is on a 32-bit boundary */ #if defined(CONFIG_X86_64) diff --git a/include/uapi/linux/falloc.h b/include/uapi/linux/falloc.h index 51398fa57f6c..89bfbb02bc16 100644 --- a/include/uapi/linux/falloc.h +++ b/include/uapi/linux/falloc.h @@ -2,6 +2,14 @@ #ifndef _UAPI_FALLOC_H_ #define _UAPI_FALLOC_H_ +/* + * FALLOC_FL_MAP_FREE_SPACE maps all the free physical space in the + * filesystem into the file at the same offsets. This flag requires + * CAP_SYS_ADMIN, and cannot be used with any other flags. It probably + * only works on filesystems that are backed by physical media. + */ +#define FALLOC_FL_MAP_FREE_SPACE (1U << 30) + #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 */ |