[SCM] Samba Shared Repository - branch master updated

Christof Schmitt cs at samba.org
Wed Feb 16 21:39:01 UTC 2022


The branch, master has been updated
       via  4e464fc96ae vfs_gpfs: use linux oplock specific funcions only when available
      from  30bf1cd9eac dns.idl/dnsp.idl: add missing DNS ressource record types

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4e464fc96ae3b431796223776ded83bcc9d14c6f
Author: Bjoern Jacke <bj at sernet.de>
Date:   Fri Jan 14 17:02:32 2022 +0000

    vfs_gpfs: use linux oplock specific funcions only when available
    
    Signed-off-by: Bjoern Jacke <bj at sernet.de>
    Reviewed-by: Christof Schmitt <cs at samba.org>
    
    Autobuild-User(master): Christof Schmitt <cs at samba.org>
    Autobuild-Date(master): Wed Feb 16 21:38:12 UTC 2022 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/test_vfs_gpfs.c |  4 ++++
 source3/modules/vfs_gpfs.c      | 11 +++++++++++
 2 files changed, 15 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/modules/test_vfs_gpfs.c b/source3/modules/test_vfs_gpfs.c
index 58f3c41934a..b03a46a352d 100644
--- a/source3/modules/test_vfs_gpfs.c
+++ b/source3/modules/test_vfs_gpfs.c
@@ -43,12 +43,14 @@ static void test_share_deny_mapping(void **state)
 			 0); /* GPFS limitation, cannot deny only delete. */
 }
 
+#ifdef HAVE_KERNEL_OPLOCKS_LINUX
 static void test_gpfs_lease_mapping(void **state)
 {
 	assert_int_equal(lease_type_to_gpfs(F_RDLCK), GPFS_LEASE_READ);
 	assert_int_equal(lease_type_to_gpfs(F_WRLCK), GPFS_LEASE_WRITE);
 	assert_int_equal(lease_type_to_gpfs(F_UNLCK), GPFS_LEASE_NONE);
 }
+#endif /* #ifdef HAVE_KERNEL_OPLOCKS_LINUX */
 
 static void test_gpfs_winattrs_to_dosmode(void **state)
 {
@@ -139,7 +141,9 @@ int main(int argc, char **argv)
 {
 	const struct CMUnitTest tests[] = {
 		cmocka_unit_test(test_share_deny_mapping),
+#ifdef HAVE_KERNEL_OPLOCKS_LINUX
 		cmocka_unit_test(test_gpfs_lease_mapping),
+#endif /* #ifdef HAVE_KERNEL_OPLOCKS_LINUX */
 		cmocka_unit_test(test_gpfs_winattrs_to_dosmode),
 		cmocka_unit_test(test_dosmode_to_gpfs_winattrs),
 		cmocka_unit_test(test_gpfs_get_file_id),
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 52517ee0084..e336f8aec5d 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -220,6 +220,7 @@ static int vfs_gpfs_close(vfs_handle_struct *handle, files_struct *fsp)
 	return SMB_VFS_NEXT_CLOSE(handle, fsp);
 }
 
+#ifdef HAVE_KERNEL_OPLOCKS_LINUX
 static int lease_type_to_gpfs(int leasetype)
 {
 	if (leasetype == F_RDLCK) {
@@ -277,6 +278,16 @@ failure:
 	return ret;
 }
 
+#else /* HAVE_KERNEL_OPLOCKS_LINUX */
+
+static int vfs_gpfs_setlease(vfs_handle_struct *handle,
+				files_struct *fsp,
+				int leasetype)
+{
+	return ENOSYS;
+}
+#endif /* HAVE_KERNEL_OPLOCKS_LINUX */
+
 static int vfs_gpfs_get_real_filename(struct vfs_handle_struct *handle,
 				      const struct smb_filename *path,
 				      const char *name,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list