Commit 309e0d6f authored by unknown's avatar unknown

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb

into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb


configure.in:
  Auto merged
parents c07065b3 fdd6efb6
...@@ -701,6 +701,8 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \ ...@@ -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/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
sys/resource.h sys/param.h) sys/resource.h sys/param.h)
AC_CHECK_HEADERS([xfs/xfs.h])
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS # Check for system libraries. Adds the library to $LIBS
# and defines HAVE_LIBM etc # and defines HAVE_LIBM etc
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
#include <my_sys.h> #include <my_sys.h>
#include <my_pthread.h> #include <my_pthread.h>
#ifdef HAVE_XFS_XFS_H
#include <xfs/xfs.h>
#endif
#include "AsyncFile.hpp" #include "AsyncFile.hpp"
#include <ErrorHandlingMacros.hpp> #include <ErrorHandlingMacros.hpp>
...@@ -459,6 +463,18 @@ no_odirect: ...@@ -459,6 +463,18 @@ no_odirect:
Uint32 index = 0; Uint32 index = 0;
Uint32 block = refToBlock(request->theUserReference); 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 #ifdef HAVE_POSIX_FALLOCATE
posix_fallocate(theFd, 0, sz); posix_fallocate(theFd, 0, sz);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment