summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-01-16 12:19:51 +0300
committerAlexander Bokovoy <ab@samba.org>2008-01-16 12:19:51 +0300
commitc283c1bb8b3a167ab20140dac914f3b6ddc21aec (patch)
treed425702433cab95958f8147ce78b135e4d7a2c78 /source3
parent313f7d10b884d083ef9488db739465c54c3f6515 (diff)
downloadsamba-c283c1bb8b3a167ab20140dac914f3b6ddc21aec.tar.gz
samba-c283c1bb8b3a167ab20140dac914f3b6ddc21aec.tar.bz2
samba-c283c1bb8b3a167ab20140dac914f3b6ddc21aec.zip
Support GPFS prealloc interface
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit c26e355533e473c4386d0e6d651637e71d4231dc)
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_prealloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c
index 2d64bc0184..cb3508dc30 100644
--- a/source3/modules/vfs_prealloc.c
+++ b/source3/modules/vfs_prealloc.c
@@ -47,11 +47,16 @@
#define lock_type struct flock64
#endif
+#ifdef HAVE_GPFS
+#include "gpfs_gpl.h"
+#endif
+
#define MODULE "prealloc"
static int module_debug;
static int preallocate_space(int fd, SMB_OFF_T size)
{
+#ifndef HAVE_GPFS
lock_type fl = {0};
int err;
@@ -78,6 +83,9 @@ static int preallocate_space(int fd, SMB_OFF_T size)
err = -1;
errno = ENOSYS;
#endif
+#else /* GPFS uses completely different interface */
+ err = gpfs_prealloc(fd, (gpfs_off64_t)0, (gpfs_off64_t)size);
+#endif
if (err) {
DEBUG(module_debug,