gpfs: Rename wrapper for gpfs_prealloc
authorChristof Schmitt <cs@samba.org>
Wed, 10 Dec 2014 22:31:42 +0000 (15:31 -0700)
committerChristof Schmitt <cs@samba.org>
Mon, 2 Mar 2015 21:31:08 +0000 (22:31 +0100)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/modules/gpfs.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_gpfs.h

index bcf5d2498a9dac5bb4f67051768b2febf0136e4b..eb200ff25f63ab9798037e4dd0ae2d401c2d8564 100644 (file)
@@ -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)
 {
index a24f5d5406b6627dfb39b3f4a93e350248ae1153..8860803906606c7848c84597b7ec7bce1ac430dc 100644 (file)
@@ -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)));
index d4b584579f8a580316df1755ea73bb8ab584b39d..83a4a612d92ce6d1c530c297606928e5aecfa380 100644 (file)
@@ -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);