diff options
-rw-r--r-- | source3/modules/gpfs.c | 22 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.c | 2 | ||||
-rw-r--r-- | 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 bcf5d2498a..eb200ff25f 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 a24f5d5406..8860803906 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 d4b584579f..83a4a612d9 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); |