Rename vfs operation posix_fallocate to just fallocate and add the vfs_fallocate_mode...
authorJeremy Allison <jra@samba.org>
Sat, 18 Dec 2010 07:08:01 +0000 (23:08 -0800)
committerJeremy Allison <jra@samba.org>
Sat, 18 Dec 2010 07:59:27 +0000 (08:59 +0100)
commit716ea734e4cd83a2030ca2cac10056bdaab1a021
tree8caf80f6c76f5de768896e6d0aebaf3fadbc3116
parent7157221da5bc6787b08ab26c9e83c08208b41d8a
Rename vfs operation posix_fallocate to just fallocate and add the vfs_fallocate_mode parameter.

It turns out we need the fallocate operations to be able to both
allocate and extend filesize, and to allocate and not extend
filesize, and posix_fallocate can only do the former. So by defining
the vfs op as posix_fallocate we lose the opportunity to use any
underlying syscalls (like Linux fallocate) that can do the latter
as well.

We don't currently use the non-extending filesize call, but now
I've changed the vfs op definition we can in the future. For the
moment simply map the fallocate op onto posix_fallocate for the
VFS_FALLOCATE_EXTEND_SIZE case and return ENOSYS for the
VFS_FALLOCATE_KEEP_SIZE case.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 18 08:59:27 CET 2010 on sn-devel-104
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/smbprofile.h
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_streams_xattr.c
source3/modules/vfs_time_audit.c
source3/profile/profile.c
source3/smbd/vfs.c