summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2016-02-25 18:27:09 +0530
committerVijay Bellur <vbellur@redhat.com>2016-03-08 18:42:24 -0800
commitc00722ff9d83d131e624f5499da05160d184cfba (patch)
tree04260a77ad327a7a731b889df2adbdf971eff579 /libglusterfs
parent66d62edd08be5701407e4adcb153a676702ff8b8 (diff)
features/shard: Return ENOTSUP for unsupported fallocate flags
Basis: http://lists.gnu.org/archive/html/qemu-devel/2016-02/msg05101.html Change-Id: I5bf80b6e8caed3d7f136fc57e16abfb28869e009 BUG: 1261841 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13523 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/compat.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h
index 183002e..04779bf 100644
--- a/libglusterfs/src/compat.h
+++ b/libglusterfs/src/compat.h
@@ -57,7 +57,9 @@
#ifndef FALLOC_FL_PUNCH_HOLE
#define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
#endif
-
+#ifndef FALLOC_FL_ZERO_RANGE
+#define FALLOC_FL_ZERO_RANGE 0x10 /* zeroes out range */
+#endif
#ifndef HAVE_LLISTXATTR
@@ -171,6 +173,7 @@ enum {
#define F_SETLKW64 F_SETLKW
#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 */
#ifndef _PATH_UMOUNT
#define _PATH_UMOUNT "/sbin/umount"