summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_ceph.c3
-rw-r--r--source3/modules/vfs_default.c13
-rw-r--r--source3/modules/vfs_fruit.c2
-rw-r--r--source3/modules/vfs_full_audit.c2
-rw-r--r--source3/modules/vfs_glusterfs.c3
-rw-r--r--source3/modules/vfs_gpfs.c7
-rw-r--r--source3/modules/vfs_streams_xattr.c2
-rw-r--r--source3/modules/vfs_time_audit.c2
8 files changed, 16 insertions, 18 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 096742863c..d53a2de338 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -796,8 +796,7 @@ static int strict_allocate_ftruncate(struct vfs_handle_struct *handle, files_str
emulation is being done by the libc (like on AIX with JFS1). In that
case we do our own emulation. fallocate implementations can
return ENOTSUP or EINVAL in cases like that. */
- ret = SMB_VFS_FALLOCATE(fsp, VFS_FALLOCATE_EXTEND_SIZE,
- pst->st_ex_size, space_to_write);
+ ret = SMB_VFS_FALLOCATE(fsp, 0, pst->st_ex_size, space_to_write);
if (ret == -1 && errno == ENOSPC) {
return -1;
}
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 31648f69fe..fdb90e4109 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1861,8 +1861,7 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
emulation is being done by the libc (like on AIX with JFS1). In that
case we do our own emulation. fallocate implementations can
return ENOTSUP or EINVAL in cases like that. */
- ret = SMB_VFS_FALLOCATE(fsp, VFS_FALLOCATE_EXTEND_SIZE,
- pst->st_ex_size, space_to_write);
+ ret = SMB_VFS_FALLOCATE(fsp, 0, pst->st_ex_size, space_to_write);
if (ret == -1 && errno == ENOSPC) {
return -1;
}
@@ -1962,14 +1961,14 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, off_t
static int vfswrap_fallocate(vfs_handle_struct *handle,
files_struct *fsp,
- enum vfs_fallocate_mode mode,
+ uint32_t mode,
off_t offset,
off_t len)
{
int result;
START_PROFILE(syscall_fallocate);
- if (mode == VFS_FALLOCATE_EXTEND_SIZE) {
+ if (mode == 0) {
result = sys_posix_fallocate(fsp->fh->fd, offset, len);
/*
* posix_fallocate returns 0 on success, errno on error
@@ -1980,11 +1979,9 @@ static int vfswrap_fallocate(vfs_handle_struct *handle,
errno = result;
result = -1;
}
- } else if (mode == VFS_FALLOCATE_KEEP_SIZE) {
- result = sys_fallocate(fsp->fh->fd, mode, offset, len);
} else {
- errno = EINVAL;
- result = -1;
+ /* sys_fallocate handles filtering of unsupported mode flags */
+ result = sys_fallocate(fsp->fh->fd, mode, offset, len);
}
END_PROFILE(syscall_fallocate);
return result;
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 0445e04cf0..fbee3217a8 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -3039,7 +3039,7 @@ exit:
static int fruit_fallocate(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- enum vfs_fallocate_mode mode,
+ uint32_t mode,
off_t offset,
off_t len)
{
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index b7a4eeeeb4..87a2f9c3bc 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -1452,7 +1452,7 @@ static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp
}
static int smb_full_audit_fallocate(vfs_handle_struct *handle, files_struct *fsp,
- enum vfs_fallocate_mode mode,
+ uint32_t mode,
off_t offset,
off_t len)
{
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 09c789c790..2c7266e27b 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -927,9 +927,10 @@ static int vfs_gluster_ftruncate(struct vfs_handle_struct *handle,
static int vfs_gluster_fallocate(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- enum vfs_fallocate_mode mode,
+ uint32_t mode,
off_t offset, off_t len)
{
+ /* TODO: add support using glfs_fallocate() and glfs_zerofill() */
errno = ENOTSUP;
return -1;
}
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 21707c5f6c..999e83b16a 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1843,7 +1843,7 @@ static int vfs_gpfs_ntimes(struct vfs_handle_struct *handle,
}
static int vfs_gpfs_fallocate(struct vfs_handle_struct *handle,
- struct files_struct *fsp, enum vfs_fallocate_mode mode,
+ struct files_struct *fsp, uint32_t mode,
off_t offset, off_t len)
{
int ret;
@@ -1859,8 +1859,9 @@ static int vfs_gpfs_fallocate(struct vfs_handle_struct *handle,
return -1;
}
- if (mode == VFS_FALLOCATE_KEEP_SIZE) {
- DEBUG(10, ("Unsupported VFS_FALLOCATE_KEEP_SIZE\n"));
+ if (mode != 0) {
+ DEBUG(10, ("unmapped fallocate flags: %lx\n",
+ (unsigned long)mode));
errno = ENOTSUP;
return -1;
}
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index b3c1df15c3..52a9059d80 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -1093,7 +1093,7 @@ static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
static int streams_xattr_fallocate(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- enum vfs_fallocate_mode mode,
+ uint32_t mode,
off_t offset,
off_t len)
{
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 04552ec9d0..45e30acfd1 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1209,7 +1209,7 @@ static int smb_time_audit_ftruncate(vfs_handle_struct *handle,
static int smb_time_audit_fallocate(vfs_handle_struct *handle,
files_struct *fsp,
- enum vfs_fallocate_mode mode,
+ uint32_t mode,
off_t offset,
off_t len)
{