mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
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@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Feb 11 02:03:09 CET 2015 on sn-devel-104
This commit is contained in:
parent
627a98d095
commit
618af83d1b
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user