From 15c2b3a825b2f24629d1bc22d2bdcfec494cde13 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Wed, 10 Dec 2014 15:31:42 -0700 Subject: [PATCH] gpfs: Rename wrapper for gpfs_prealloc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Christof Schmitt Reviewed-by: Ralph Böhme --- source3/modules/gpfs.c | 22 +++++++++++----------- source3/modules/vfs_gpfs.c | 2 +- source3/modules/vfs_gpfs.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index bcf5d2498a9..eb200ff25f6 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -37,7 +37,7 @@ static int (*gpfs_set_winattrs_path_fn)(char *pathname, int flags, static int (*gpfs_get_winattrs_path_fn)(char *pathname, struct gpfs_winattr *attrs); static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs); -static int (*gpfs_prealloc_fn)(int fd, gpfs_off64_t startOffset, gpfs_off64_t bytesToPrealloc); +static int (*gpfs_prealloc_fn)(int fd, gpfs_off64_t start, gpfs_off64_t bytes); static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length); static int (*gpfs_lib_init_fn)(int flags); static int (*gpfs_set_times_path_fn)(char *pathname, int flags, @@ -159,6 +159,16 @@ int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs) return gpfs_get_winattrs_fn(fd, attrs); } +int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes) +{ + if (gpfs_prealloc_fn == NULL) { + errno = ENOSYS; + return -1; + } + + return gpfs_prealloc_fn(fd, start, bytes); +} + bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access) { @@ -234,16 +244,6 @@ int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length) return gpfs_ftruncate_fn(fd, length); } -int smbd_gpfs_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes) -{ - if (gpfs_prealloc_fn == NULL) { - errno = ENOSYS; - return -1; - } - - return gpfs_prealloc_fn(fd, start, bytes); -} - int get_gpfs_quota(const char *pathname, int type, int id, struct gpfs_quotaInfo *qi) { diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index a24f5d5406b..88608039066 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1760,7 +1760,7 @@ static int vfs_gpfs_fallocate(struct vfs_handle_struct *handle, return -1; } - ret = smbd_gpfs_prealloc(fsp->fh->fd, offset, len); + ret = gpfswrap_prealloc(fsp->fh->fd, offset, len); if (ret == -1 && errno != ENOSYS) { DEBUG(0, ("GPFS prealloc failed: %s\n", strerror(errno))); diff --git a/source3/modules/vfs_gpfs.h b/source3/modules/vfs_gpfs.h index d4b584579f8..83a4a612d92 100644 --- a/source3/modules/vfs_gpfs.h +++ b/source3/modules/vfs_gpfs.h @@ -37,10 +37,10 @@ int gpfswrap_set_winattrs_path(char *pathname, int flags, struct gpfs_winattr *attrs); int gpfswrap_get_winattrs_path(char *pathname, struct gpfs_winattr *attrs); int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs); +int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes); bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access); int set_gpfs_lease(int fd, int leasetype); -int smbd_gpfs_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes); int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length); int get_gpfs_quota(const char *pathname, int type, int id, struct gpfs_quotaInfo *qi); -- 2.11.4.GIT