Loading configure.in +2 −0 Original line number Diff line number Diff line Loading @@ -701,6 +701,8 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \ sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \ sys/resource.h sys/param.h) AC_CHECK_HEADERS([xfs/xfs.h]) #-------------------------------------------------------------------- # Check for system libraries. Adds the library to $LIBS # and defines HAVE_LIBM etc Loading storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,10 @@ #include <my_sys.h> #include <my_pthread.h> #ifdef HAVE_XFS_XFS_H #include <xfs/xfs.h> #endif #include "AsyncFile.hpp" #include <ErrorHandlingMacros.hpp> Loading Loading @@ -459,6 +463,18 @@ void AsyncFile::openReq(Request* request) Uint32 index = 0; Uint32 block = refToBlock(request->theUserReference); #ifdef HAVE_XFS_XFS_H if(platform_test_xfs_fd(theFd)) { ndbout_c("Using xfsctl(XFS_IOC_RESVSP64) to allocate disk space"); xfs_flock64_t fl; fl.l_whence= 0; fl.l_start= 0; fl.l_len= (off64_t)sz; if(xfsctl(NULL, theFd, XFS_IOC_RESVSP64, &fl) < 0) ndbout_c("failed to optimally allocate disk space"); } #endif #ifdef HAVE_POSIX_FALLOCATE posix_fallocate(theFd, 0, sz); #endif Loading Loading
configure.in +2 −0 Original line number Diff line number Diff line Loading @@ -701,6 +701,8 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \ sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \ sys/resource.h sys/param.h) AC_CHECK_HEADERS([xfs/xfs.h]) #-------------------------------------------------------------------- # Check for system libraries. Adds the library to $LIBS # and defines HAVE_LIBM etc Loading
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,10 @@ #include <my_sys.h> #include <my_pthread.h> #ifdef HAVE_XFS_XFS_H #include <xfs/xfs.h> #endif #include "AsyncFile.hpp" #include <ErrorHandlingMacros.hpp> Loading Loading @@ -459,6 +463,18 @@ void AsyncFile::openReq(Request* request) Uint32 index = 0; Uint32 block = refToBlock(request->theUserReference); #ifdef HAVE_XFS_XFS_H if(platform_test_xfs_fd(theFd)) { ndbout_c("Using xfsctl(XFS_IOC_RESVSP64) to allocate disk space"); xfs_flock64_t fl; fl.l_whence= 0; fl.l_start= 0; fl.l_len= (off64_t)sz; if(xfsctl(NULL, theFd, XFS_IOC_RESVSP64, &fl) < 0) ndbout_c("failed to optimally allocate disk space"); } #endif #ifdef HAVE_POSIX_FALLOCATE posix_fallocate(theFd, 0, sz); #endif Loading