From 5819a36aef030772f1e9da81655c1f911a10372c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 2 Dec 2010 16:25:59 -0800 Subject: Move posix_fallocate into the VFS where it belongs. Jeremy. --- examples/VFS/skel_opaque.c | 8 ++++++++ examples/VFS/skel_transparent.c | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'examples') diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 42f4e48cd9..40ee5e9d6e 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -308,6 +308,13 @@ static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_ return -1; } +static int skel_posix_fallocate(vfs_handle_struct *handle, files_struct *fsp, + SMB_OFF_T offset, SMB_OFF_T len) +{ + errno = ENOSYS; + return -1; +} + static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) { errno = ENOSYS; @@ -813,6 +820,7 @@ struct vfs_fn_pointers skel_transparent_fns = { .getwd = skel_getwd, .ntimes = skel_ntimes, .ftruncate = skel_ftruncate, + .posix_fallocate = skel_posix_fallocate, .lock = skel_lock, .kernel_flock = skel_kernel_flock, .linux_setlease = skel_linux_setlease, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 42e54a8871..ca22a30564 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -292,6 +292,13 @@ static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_ return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset); } +static int skel_posix_fallocate(vfs_handle_struct *handle, files_struct *fsp, + SMB_OFF_T offset, + SMB_OFF_T len) +{ + return SMB_VFS_NEXT_POSIX_FALLOCATE(handle, fsp, offset, len); +} + static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) { return SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type); @@ -757,6 +764,7 @@ struct vfs_fn_pointers skel_transparent_fns = { .getwd = skel_getwd, .ntimes = skel_ntimes, .ftruncate = skel_ftruncate, + .posix_fallocate = skel_posix_fallocate, .lock = skel_lock, .kernel_flock = skel_kernel_flock, .linux_setlease = skel_linux_setlease, -- cgit