From: wumingqiao Date: Tue, 13 Feb 2018 07:50:18 +0000 (+0800) Subject: filestore: include X-Git-Tag: v13.0.2~153^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=200904f737f01297a609a7f6215f33cd9403dfd8;p=ceph.git filestore: include see https://github.com/ceph/ceph/pull/7768 because we neither define FALLOC_FL_KEEP_SIZE nor include linux/falloc.h,this pull actually disable punching hole. Signed-off-by: wumingqiao --- diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 6a0fd8603c63..8d6fc3eae65c 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -28,6 +28,7 @@ #if defined(__linux__) #include +#include #endif #include diff --git a/src/os/filestore/FileStore.h b/src/os/filestore/FileStore.h index 9aeaefa7f3c5..85300caf12fc 100644 --- a/src/os/filestore/FileStore.h +++ b/src/os/filestore/FileStore.h @@ -48,12 +48,6 @@ #include "include/uuid.h" - -// from include/linux/falloc.h: -#ifndef FALLOC_FL_PUNCH_HOLE -# define FALLOC_FL_PUNCH_HOLE 0x2 -#endif - #if defined(__linux__) # ifndef BTRFS_SUPER_MAGIC #define BTRFS_SUPER_MAGIC 0x9123683EL diff --git a/src/os/fs/FS.cc b/src/os/fs/FS.cc index e73586c0411e..9cfa103b939a 100644 --- a/src/os/fs/FS.cc +++ b/src/os/fs/FS.cc @@ -17,9 +17,8 @@ #include #include -// from include/linux/falloc.h: -#ifndef FALLOC_FL_PUNCH_HOLE -# define FALLOC_FL_PUNCH_HOLE 0x2 +#ifdef __linux__ +#include #endif #include "FS.h"