summaryrefslogtreecommitdiffstats
path: root/include/linux/falloc.h
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2015-03-25 15:07:05 +1100
committerDave Chinner <david@fromorbit.com>2015-03-25 15:07:05 +1100
commitdd46c787788d5bf5b974729d43e4c405814a4c7d (patch)
tree67ae36b5a9cbbec7b71995417f9350999dca6b9c /include/linux/falloc.h
parent444a702231412e82fb1c09679adc159301e9242c (diff)
downloadop-kernel-dev-dd46c787788d5bf5b974729d43e4c405814a4c7d.zip
op-kernel-dev-dd46c787788d5bf5b974729d43e4c405814a4c7d.tar.gz
fs: Add support FALLOC_FL_INSERT_RANGE for fallocate
FALLOC_FL_INSERT_RANGE command is the opposite command of FALLOC_FL_COLLAPSE_RANGE that is needed for someone who wants to add some data in the middle of file. FALLOC_FL_INSERT_RANGE will create space for writing new data within a file after shifting extents to right as given length. This command also has same limitations as FALLOC_FL_COLLAPSE_RANGE in that operations need to be filesystem block boundary aligned and cannot cross the current EOF. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'include/linux/falloc.h')
-rw-r--r--include/linux/falloc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/falloc.h b/include/linux/falloc.h
index 3159168..9961110 100644
--- a/include/linux/falloc.h
+++ b/include/linux/falloc.h
@@ -21,4 +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)
+#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_ */
OpenPOWER on IntegriCloud