From 4fe70bcee2ec8515f123d8c826631b54bbf793e7 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Thu, 9 Nov 2006 20:29:31 +0000 Subject: r19647: Add some GPFS support in a vfs mod. Also adds the kernel flock op to the vfs layer, since gpfs supports it. Thanks to Volker, Christian, Mathias, Chetan, and Peter. (This used to be commit 0620658890fa9c68a9848538728023192319c81a) --- source3/modules/vfs_default.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/modules/vfs_default.c') diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index ae565ae980..486a76ac88 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -764,6 +764,15 @@ static BOOL vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, i return result; } +static int vfswrap_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, int fd, + uint32 share_mode) +{ + START_PROFILE(syscall_kernel_flock); + kernel_flock(fd, share_mode); + END_PROFILE(syscall_kernel_flock); + return 0; +} + static BOOL vfswrap_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid) { BOOL result; @@ -1189,6 +1198,8 @@ static vfs_op_tuple vfs_default_ops[] = { SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_lock), SMB_VFS_OP_LOCK, SMB_VFS_LAYER_OPAQUE}, + {SMB_VFS_OP(vfswrap_kernel_flock), SMB_VFS_OP_KERNEL_FLOCK, + SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_getlock), SMB_VFS_OP_GETLOCK, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_symlink), SMB_VFS_OP_SYMLINK, -- cgit