summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-12-20 16:53:16 -0800
committerJeremy Allison <jra@samba.org>2010-12-21 02:41:23 +0100
commit8998f4b01310e4b45e75d8d5f3260b5ba5c1cdf9 (patch)
tree21e648af9bd549f577ab8cbf59ebdeb89963cbd7 /source3/modules
parent09aea038139f8717d38f0fdae6be9cf46bd86b15 (diff)
downloadsamba-8998f4b01310e4b45e75d8d5f3260b5ba5c1cdf9.tar.gz
samba-8998f4b01310e4b45e75d8d5f3260b5ba5c1cdf9.tar.xz
samba-8998f4b01310e4b45e75d8d5f3260b5ba5c1cdf9.zip
Added call out to a Linux-compatible fallocate() when we need to extend a file
allocation extent without changing end-of-file size. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 21 02:41:24 CET 2010 on sn-devel-104
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index e08d48ff5f0..54f38c3714b 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -965,9 +965,10 @@ static int vfswrap_fallocate(vfs_handle_struct *handle,
START_PROFILE(syscall_fallocate);
if (mode == VFS_FALLOCATE_EXTEND_SIZE) {
result = sys_posix_fallocate(fsp->fh->fd, offset, len);
+ } else if (mode == VFS_FALLOCATE_KEEP_SIZE) {
+ result = sys_fallocate(fsp->fh->fd, mode, offset, len);
} else {
- /* TODO - implement call into Linux fallocate call. */
- errno = ENOSYS;
+ errno = EINVAL;
result = -1;
}
END_PROFILE(syscall_fallocate);