1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source3
David Disseldorp 1359e85932 smbd/ioctl: add FSCTL_SET_ZERO_DATA support
FSCTL_SET_ZERO_DATA can be used in two ways.
- When requested against a file marked as sparse, it provides a
  mechanism for requesting that the server deallocate the underlying
  disk space for the corresponding zeroed range.
- When requested against a non-sparse file, it indicates that the server
  should allocate and zero the corresponding range.

Both use cases can be handled in Samba using fallocate(). The Linux
specific FALLOC_FL_PUNCH_HOLE flag can be used to deallocate the
underlying disk space. After doing so, a normal fallocate() call can
be used to ensure that the zeroed range is allocated on non-sparse
files.

FSCTL_SET_ZERO_DATA requests must not result in a change to the file
size. The FSCTL_SET_ZERO_DATA handler always calls fallocate() with the
KEEP_SIZE flag set, ensuring that Samba meets this requirement.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-09 21:27:07 +01:00
..
auth s3: auth: Add previously missing allocation fail check. 2015-01-14 06:24:06 +01:00
build waf: improve iconv checks 2014-01-03 05:04:44 +01:00
client s3: smbclient: Allinfo leaves the file handle open. 2015-02-10 23:28:46 +01:00
exports
groupdb mapping_tdb: add missing talloc_free in error path 2014-11-10 16:36:03 +01:00
include system: add hole punch support to sys_fallocate() 2015-03-09 21:27:07 +01:00
intl lang_tdb: don't leak lock_path or data_path onto talloc tos 2014-11-03 23:46:05 +01:00
lib system: add hole punch support to sys_fallocate() 2015-03-09 21:27:07 +01:00
libads libads: Fix CID 1273305 Uninitialized scalar variable 2015-03-04 14:46:07 +01:00
libgpo gpo: don't leak cache_path onto talloc tos 2014-10-06 19:18:05 +02:00
libnet allow net ads join accept new osServicePack parameter 2015-01-08 00:18:05 +01:00
librpc librpc: Move messaging.idl to the top level 2015-02-16 12:15:07 +01:00
libsmb libsmb: Make "ip_service_compare" static 2015-02-27 06:20:58 +01:00
locale winbind/i18n: update Japanese pam winbind translation 2014-07-26 20:43:28 +02:00
locking leases_db: don't leak lock_path onto talloc tos 2015-01-12 19:22:30 +01:00
modules s3/vfs: change fallocate mode flags from enum->uint32_t 2015-03-09 21:27:07 +01:00
nmbd lib: Split out write_data[_iov] 2014-12-07 00:12:07 +01:00
pam_smbpass s3-pam_smbpass: Add a deprecation warning. 2015-02-25 03:37:34 +01:00
param MSDFS referral shuffling 2015-02-27 22:53:06 +01:00
passdb Fix the O3 developer build 2015-03-03 13:14:53 +01:00
printing printing: increse log level for unreachable cups servers 2015-03-05 14:38:42 +01:00
profile s3:smbprofile: profile the system and user space cpu time 2015-03-06 12:31:10 +01:00
registry registry: Fix an aligment increase warning 2015-02-26 05:35:33 +01:00
rpc_client s3:rpc_client: add cli_rpc_pipe_open_schannel_with_creds() helper function 2014-12-19 13:15:13 +01:00
rpc_server rpc_server: Fix CID 1273433 Unused value 2015-03-04 23:29:01 +01:00
rpcclient rpcclient: Fix and enhance rpcclient output 2015-02-17 15:41:10 +01:00
script s3: auth - tests: Add test for "force user" being a unix-only user, not in passdb. 2015-01-14 08:46:07 +01:00
selftest selftest: re-enable nsswrapper integration testing for dc and member environments. 2015-03-02 19:50:55 +01:00
services
smbd smbd/ioctl: add FSCTL_SET_ZERO_DATA support 2015-03-09 21:27:07 +01:00
stf
torture s3/vfs: remove unused SMB_VFS_DISK_FREE() small_query parameter 2015-02-17 05:37:20 +01:00
utils s3:smbprofile: Replace sysv shmem with tdb 2015-03-06 12:31:10 +01:00
web swat: Remove swat. 2013-05-18 16:32:38 +02:00
winbindd s3-winbind: Fix chached user group lookup of trusted domains. 2015-03-09 19:23:25 +01:00
.clang_complete Remove popt/iniparser from .clang_complete 2014-08-14 21:27:13 +02:00
.dmallocrc
.indent.pro
change-log
Doxyfile
mainpage.dox
smbadduser.in
wscript build: check for fallocate hole-punch support 2015-03-09 21:27:07 +01:00
wscript_build lib: Move "iov_buf.[ch]" to lib/util 2015-02-24 17:52:08 +01:00
wscript_configure_system_ncurses build: fix --with-regedit to properly honour the yes/no/auto scheme 2013-05-06 18:24:58 +02:00