summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorSunil Kumar Acharya <sheggodu@redhat.com>2017-05-17 14:35:41 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2017-05-23 07:13:06 +0000
commitacf8cc3a2283d209337ba9f5da6b03396daac359 (patch)
tree96f01f452cce704d639608d0d030066a087ee748 /libglusterfs/src
parent8dc63c8824fc1a00c873c16e8a16a14fca7c8cca (diff)
cluster/ec: Implement FALLOCATE FOP for EC
FALLOCATE file operations is not implemented in the existing EC code. This change set implements it for EC. BUG: 1448293 Change-Id: Id9ed914db984c327c16878a5b2304a0ea461b623 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com> Reviewed-on: https://review.gluster.org/15200 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h
index fbaac76b9ee..f4da4b2a0de 100644
--- a/libglusterfs/src/compat.h
+++ b/libglusterfs/src/compat.h
@@ -59,6 +59,12 @@
#ifndef FALLOC_FL_ZERO_RANGE
#define FALLOC_FL_ZERO_RANGE 0x10 /* zeroes out range */
#endif
+#ifndef FALLOC_FL_COLLAPSE_RANGE
+#define FALLOC_FL_COLLAPSE_RANGE 0x08 /* reduces the size */
+#endif
+#ifndef FALLOC_FL_INSERT_RANGE
+#define FALLOC_FL_INSERT_RANGE 0x20 /* expands the size */
+#endif
#ifndef HAVE_LLISTXATTR
@@ -177,6 +183,8 @@ enum {
#define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */
#define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
#define FALLOC_FL_ZERO_RANGE 0x10 /* zeroes out range */
+#define FALLOC_FL_INSERT_RANGE 0x20 /* Expands the size */
+#define FALLOC_FL_COLLAPSE_RANGE 0x08 /* Reduces the size */
#ifndef _PATH_UMOUNT
#define _PATH_UMOUNT "/sbin/umount"