diff options
author | Christof Schmitt <cs@samba.org> | 2014-12-10 15:31:42 -0700 |
---|---|---|
committer | Christof Schmitt <cs@samba.org> | 2015-03-02 22:31:08 +0100 |
commit | 15c2b3a825b2f24629d1bc22d2bdcfec494cde13 (patch) | |
tree | 9bd9aac6c06a6a343ba03e699888c7f4e25ee506 /source3 | |
parent | 4d57c20ba8450b3eb4fdf0bbd9c922ae5d02312b (diff) | |
download | samba-15c2b3a825b2f24629d1bc22d2bdcfec494cde13.tar.gz samba-15c2b3a825b2f24629d1bc22d2bdcfec494cde13.tar.xz samba-15c2b3a825b2f24629d1bc22d2bdcfec494cde13.zip |
gpfs: Rename wrapper for gpfs_prealloc
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source3')
-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); |