[PATCH] vfs_prealloc: Remove call to gpfs_prealloc

Christof Schmitt cs at samba.org
Tue Feb 10 14:21:22 MST 2015


From a4c2aab77cd445f2940c9d37b4e0c724e3321c51 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Tue, 10 Feb 2015 13:36:17 -0700
Subject: [PATCH] vfs_prealloc: Remove call to gpfs_prealloc

Calling gpfs_prealloc changes the actual size of the file, and this
should not be done implicitly. Also this code does not compile due to
the missing dependency to the gpfs library. The best way solution here
is probably removing the call to gpfs_prealloc. The vfs_gpfs module
already implements the call to gpfs_prelloc when this can be done
safely.

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/modules/vfs_prealloc.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c
index 4ba27a6..7b96d36 100644
--- a/source3/modules/vfs_prealloc.c
+++ b/source3/modules/vfs_prealloc.c
@@ -49,17 +49,12 @@
 #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, off_t size)
 {
 	int err;
-#ifndef HAVE_GPFS
 	lock_type fl = {0};
 
 	if (size <= 0) {
@@ -85,10 +80,6 @@ static int preallocate_space(int fd, 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,
 			("%s: preallocate failed on fd=%d size=%lld: %s\n",
-- 
1.7.1



More information about the samba-technical mailing list