gfs2-utils: RHEL7 - gfs2_grow: Put back the definition of FALLOC_FL_KEEP_SIZE

Andrew Price andyp at fedoraproject.org
Tue Apr 7 21:24:35 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=be3383e4f295c0d519c811ac9ace6bbbfa5f58e3
Commit:        be3383e4f295c0d519c811ac9ace6bbbfa5f58e3
Parent:        34defaf57b621dbe4b0b6eb4940fd15ae524a845
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Tue Apr 7 12:00:08 2015 +0100
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Tue Apr 7 19:36:30 2015 +0100

gfs2_grow: Put back the definition of FALLOC_FL_KEEP_SIZE

An #include <linux/falloc.h> was removed in commit 14193bb. Although
fallocate(2) support was added to glibc 2.10, the FALLOC_FL_*
definitions were not added until 2.18. This means that gfs2-utils failed
to build on RHEL7 which has glibc 2.17. Add back the FALLOC_FL_KEEP_SIZE
definition in main_grow.c to fix that.

Signed-off-by: Andrew Price <anprice at redhat.com>
---
 gfs2/mkfs/main_grow.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index cc32585..4757ac7 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -38,6 +38,9 @@ int print_level = MSG_NOTICE;
 extern int create_new_inode(struct gfs2_sbd *sdp);
 extern int rename2system(struct gfs2_sbd *sdp, char *new_dir, char *new_name);
 
+#ifndef FALLOC_FL_KEEP_SIZE
+#define FALLOC_FL_KEEP_SIZE 0x01
+#endif
 #ifndef BLKDISCARD
 #define BLKDISCARD      _IO(0x12,119)
 #endif


More information about the cluster-commits mailing list