summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-12-20 17:58:33 -0800
committerJeremy Allison <jra@samba.org>2010-12-21 04:12:22 +0100
commit0a5f4f523fe3dcb90033ee53c838ad6030f608b4 (patch)
treee7bc21a1ab8d57241730a1601f6079948444e2d3 /source3/modules
parent4820c97e9ea00e73f3188f9834a03913ed74df80 (diff)
downloadsamba-0a5f4f523fe3dcb90033ee53c838ad6030f608b4.tar.gz
samba-0a5f4f523fe3dcb90033ee53c838ad6030f608b4.tar.bz2
samba-0a5f4f523fe3dcb90033ee53c838ad6030f608b4.zip
Keep track of the sparse status of an open file handle. Allows bypass of
strict allocation on sparse files. Files opened as POSIX opens are always sparse. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 21 04:12:22 CET 2010 on sn-devel-104
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 54f38c3714..9cca349413 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -895,7 +895,7 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_O
START_PROFILE(syscall_ftruncate);
- if (lp_strict_allocate(SNUM(fsp->conn))) {
+ if (lp_strict_allocate(SNUM(fsp->conn)) && !fsp->is_sparse) {
result = strict_allocate_ftruncate(handle, fsp, len);
END_PROFILE(syscall_ftruncate);
return result;