mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
gpfs: Rename wrapper for gpfs_ftruncate
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
This commit is contained in:
parent
15c2b3a825
commit
eefb916192
@ -169,6 +169,16 @@ int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes)
|
||||
return gpfs_prealloc_fn(fd, start, bytes);
|
||||
}
|
||||
|
||||
int gpfswrap_ftruncate(int fd, gpfs_off64_t length)
|
||||
{
|
||||
if (gpfs_ftruncate_fn == NULL) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return gpfs_ftruncate_fn(fd, length);
|
||||
}
|
||||
|
||||
bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
|
||||
uint32 share_access)
|
||||
{
|
||||
@ -234,16 +244,6 @@ int set_gpfs_lease(int fd, int leasetype)
|
||||
return gpfswrap_set_lease(fd, gpfs_type);
|
||||
}
|
||||
|
||||
int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length)
|
||||
{
|
||||
if (gpfs_ftruncate_fn == NULL) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return gpfs_ftruncate_fn(fd, length);
|
||||
}
|
||||
|
||||
int get_gpfs_quota(const char *pathname, int type, int id,
|
||||
struct gpfs_quotaInfo *qi)
|
||||
{
|
||||
|
@ -1787,7 +1787,7 @@ static int vfs_gpfs_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
|
||||
return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, len);
|
||||
}
|
||||
|
||||
result = smbd_gpfs_ftruncate(fsp->fh->fd, len);
|
||||
result = gpfswrap_ftruncate(fsp->fh->fd, len);
|
||||
if ((result == -1) && (errno == ENOSYS)) {
|
||||
return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, len);
|
||||
}
|
||||
|
@ -38,10 +38,10 @@ int gpfswrap_set_winattrs_path(char *pathname, int flags,
|
||||
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);
|
||||
int gpfswrap_ftruncate(int fd, gpfs_off64_t length);
|
||||
bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
|
||||
uint32 share_access);
|
||||
int set_gpfs_lease(int fd, int leasetype);
|
||||
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);
|
||||
int get_gpfs_fset_id(const char *pathname, int *fset_id);
|
||||
|
Loading…
Reference in New Issue
Block a user