vfs: Remove SMB_VFS_BRL_CANCEL_WINDOWS
authorVolker Lendecke <vl@samba.org>
Thu, 20 Jun 2019 11:42:12 +0000 (13:42 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 20 Jun 2019 18:34:20 +0000 (18:34 +0000)
This is not called anymore, bump the VFS version number in a separate
commit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 20 18:34:20 UTC 2019 on sn-devel-184

examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/locking/brlock.c
source3/locking/proto.h
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_not_implemented.c
source3/modules/vfs_time_audit.c

index 6510ef30d6f5087183f48ca370b6ebaf3e4073c9..6628bffe3eb4bc028ab6711e3ff1fbc51e0ed9d2 100644 (file)
@@ -655,14 +655,6 @@ static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
        return false;
 }
 
-static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                   struct byte_range_lock *br_lck,
-                                   struct lock_struct *plock)
-{
-       errno = ENOSYS;
-       return false;
-}
-
 static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
                                   struct files_struct *fsp,
                                   struct lock_struct *plock)
@@ -1104,7 +1096,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .connectpath_fn = skel_connectpath,
        .brl_lock_windows_fn = skel_brl_lock_windows,
        .brl_unlock_windows_fn = skel_brl_unlock_windows,
-       .brl_cancel_windows_fn = skel_brl_cancel_windows,
        .strict_lock_check_fn = skel_strict_lock_check,
        .translate_name_fn = skel_translate_name,
        .fsctl_fn = skel_fsctl,
index fc892a23208276f4e7aa9adb481b966bdae5c2f0..9b5f336042e043c499bdeab2ca125ff3f16334df 100644 (file)
@@ -827,13 +827,6 @@ static bool skel_brl_unlock_windows(struct vfs_handle_struct *handle,
        return SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock);
 }
 
-static bool skel_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                   struct byte_range_lock *br_lck,
-                                   struct lock_struct *plock)
-{
-       return SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
-}
-
 static bool skel_strict_lock_check(struct vfs_handle_struct *handle,
                                   struct files_struct *fsp,
                                   struct lock_struct *plock)
@@ -1367,7 +1360,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
        .connectpath_fn = skel_connectpath,
        .brl_lock_windows_fn = skel_brl_lock_windows,
        .brl_unlock_windows_fn = skel_brl_unlock_windows,
-       .brl_cancel_windows_fn = skel_brl_cancel_windows,
        .strict_lock_check_fn = skel_strict_lock_check,
        .translate_name_fn = skel_translate_name,
        .fsctl_fn = skel_fsctl,
index 6f6bdbf28ad0c53e637a33ffbfc9316376517891..4727fc029dad13ab8dfb61ec52ffa44890200440 100644 (file)
 /* Bump to version 40, Samba 4.10 will ship with that */
 /* Version 40 - Add SMB_VFS_GETXATTRAT_SEND/RECV */
 /* Version 40 - Add SMB_VFS_GET_DOS_ATTRIBUTES_SEND/RECV */
+/* Bump to version 41, Samba 4.11 will ship with that */
+/* Version 41 - Remove SMB_VFS_BRL_CANCEL_WINDOWS */
 
-#define SMB_VFS_INTERFACE_VERSION 40
+#define SMB_VFS_INTERFACE_VERSION 41
 
 /*
     All intercepted VFS operations must be declared as static functions inside module source
@@ -870,10 +872,6 @@ struct vfs_fn_pointers {
                                      struct byte_range_lock *br_lck,
                                      const struct lock_struct *plock);
 
-       bool (*brl_cancel_windows_fn)(struct vfs_handle_struct *handle,
-                                     struct byte_range_lock *br_lck,
-                                     struct lock_struct *plock);
-
        bool (*strict_lock_check_fn)(struct vfs_handle_struct *handle,
                                     struct files_struct *fsp,
                                     struct lock_struct *plock);
@@ -1345,9 +1343,6 @@ bool smb_vfs_call_brl_unlock_windows(struct vfs_handle_struct *handle,
                                     struct messaging_context *msg_ctx,
                                     struct byte_range_lock *br_lck,
                                     const struct lock_struct *plock);
-bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                    struct byte_range_lock *br_lck,
-                                    struct lock_struct *plock);
 bool smb_vfs_call_strict_lock_check(struct vfs_handle_struct *handle,
                                    struct files_struct *fsp,
                                    struct lock_struct *plock);
@@ -1809,9 +1804,6 @@ bool vfs_not_implemented_brl_unlock_windows(struct vfs_handle_struct *handle,
                                            struct messaging_context *msg_ctx,
                                            struct byte_range_lock *br_lck,
                                            const struct lock_struct *plock);
-bool vfs_not_implemented_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                           struct byte_range_lock *br_lck,
-                                           struct lock_struct *plock);
 bool vfs_not_implemented_strict_lock_check(struct vfs_handle_struct *handle,
                                           struct files_struct *fsp,
                                           struct lock_struct *plock);
index 7a0f14ef08d4cf64f950c9ca8d3ad4af6de9edd2..e867810f30f58c122bd4d0bb394e8d0182dee1b7 100644 (file)
 #define SMB_VFS_NEXT_BRL_UNLOCK_WINDOWS(handle, msg_ctx, br_lck, plock) \
        smb_vfs_call_brl_unlock_windows((handle)->next, (msg_ctx), (br_lck), (plock))
 
-#define SMB_VFS_BRL_CANCEL_WINDOWS(conn, br_lck, plock) \
-       smb_vfs_call_brl_cancel_windows((conn)->vfs_handles, (br_lck), (plock))
-#define SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock) \
-       smb_vfs_call_brl_cancel_windows((handle)->next, (br_lck), (plock))
-
 #define SMB_VFS_STRICT_LOCK_CHECK(conn, fsp, plock) \
        smb_vfs_call_strict_lock_check((conn)->vfs_handles, (fsp), (plock))
 #define SMB_VFS_NEXT_STRICT_LOCK_CHECK(handle, fsp, plock) \
index b9a244916bc76364e68e58bf95a4d2f750a31ddc..00462a31c78417de3e3fd04bf3d18bcac41e8dff 100644 (file)
@@ -1366,20 +1366,6 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
 }
 
 
-bool smb_vfs_call_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                    struct byte_range_lock *br_lck,
-                                    struct lock_struct *plock)
-{
-       VFS_FIND(brl_cancel_windows);
-       return handle->fns->brl_cancel_windows_fn(handle, br_lck, plock);
-}
-
-bool brl_lock_cancel_default(struct byte_range_lock *br_lck,
-               struct lock_struct *plock)
-{
-       return false;
-}
-
 /****************************************************************************
  Remove any locks associated with a open file.
  We return True if this process owns any other Windows locks on this
index 49fb66d115cce34cd600f40dbf0675f1fe404b0f..1e90a40a9ea722bdeb5c0bb14349589ff1e887fb 100644 (file)
@@ -68,8 +68,6 @@ NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
                br_off *psize,
                enum brl_type *plock_type,
                enum brl_flavour lock_flav);
-bool brl_lock_cancel_default(struct byte_range_lock *br_lck,
-               struct lock_struct *plock);
 bool brl_mark_disconnected(struct files_struct *fsp);
 bool brl_reconnect_disconnected(struct files_struct *fsp);
 void brl_close_fnum(struct messaging_context *msg_ctx,
index 47722d53cec2634574d60a856d8397b9c61559c2..f2f2ed7f7d18553357bdb62f298b7c3274663b20 100644 (file)
@@ -2832,16 +2832,6 @@ static bool vfswrap_brl_unlock_windows(struct vfs_handle_struct *handle,
        return brl_unlock_windows_default(msg_ctx, br_lck, plock);
 }
 
-static bool vfswrap_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                      struct byte_range_lock *br_lck,
-                                      struct lock_struct *plock)
-{
-       SMB_ASSERT(plock->lock_flav == WINDOWS_LOCK);
-
-       /* Note: blr is not used in the default implementation. */
-       return brl_lock_cancel_default(br_lck, plock);
-}
-
 static bool vfswrap_strict_lock_check(struct vfs_handle_struct *handle,
                                      files_struct *fsp,
                                      struct lock_struct *plock)
@@ -3462,7 +3452,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .connectpath_fn = vfswrap_connectpath,
        .brl_lock_windows_fn = vfswrap_brl_lock_windows,
        .brl_unlock_windows_fn = vfswrap_brl_unlock_windows,
-       .brl_cancel_windows_fn = vfswrap_brl_cancel_windows,
        .strict_lock_check_fn = vfswrap_strict_lock_check,
        .translate_name_fn = vfswrap_translate_name,
        .fsctl_fn = vfswrap_fsctl,
index a4e2afa0dbb41e1b0a822fb7fc420b1cfcd217a0..8c4dc44dc5d9b68974ef01cda0adf8bc65ab44c5 100644 (file)
@@ -163,7 +163,6 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_CONNECTPATH,
        SMB_VFS_OP_BRL_LOCK_WINDOWS,
        SMB_VFS_OP_BRL_UNLOCK_WINDOWS,
-       SMB_VFS_OP_BRL_CANCEL_WINDOWS,
        SMB_VFS_OP_STRICT_LOCK_CHECK,
        SMB_VFS_OP_TRANSLATE_NAME,
        SMB_VFS_OP_FSCTL,
@@ -306,7 +305,6 @@ static struct {
        { SMB_VFS_OP_CONNECTPATH,       "connectpath" },
        { SMB_VFS_OP_BRL_LOCK_WINDOWS,  "brl_lock_windows" },
        { SMB_VFS_OP_BRL_UNLOCK_WINDOWS, "brl_unlock_windows" },
-       { SMB_VFS_OP_BRL_CANCEL_WINDOWS, "brl_cancel_windows" },
        { SMB_VFS_OP_STRICT_LOCK_CHECK, "strict_lock_check" },
        { SMB_VFS_OP_TRANSLATE_NAME,    "translate_name" },
        { SMB_VFS_OP_FSCTL,             "fsctl" },
@@ -1910,23 +1908,6 @@ static bool smb_full_audit_brl_unlock_windows(struct vfs_handle_struct *handle,
        return result;
 }
 
-static bool smb_full_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                             struct byte_range_lock *br_lck,
-                                             struct lock_struct *plock)
-{
-       bool result;
-
-       result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
-
-       do_log(SMB_VFS_OP_BRL_CANCEL_WINDOWS, (result == 0), handle,
-              "%s:%llu-%llu:%d", fsp_str_do_log(brl_fsp(br_lck)),
-              (unsigned long long)plock->start,
-              (unsigned long long)plock->size,
-              plock->lock_type);
-
-       return result;
-}
-
 static bool smb_full_audit_strict_lock_check(struct vfs_handle_struct *handle,
                                             struct files_struct *fsp,
                                             struct lock_struct *plock)
@@ -2897,7 +2878,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .connectpath_fn = smb_full_audit_connectpath,
        .brl_lock_windows_fn = smb_full_audit_brl_lock_windows,
        .brl_unlock_windows_fn = smb_full_audit_brl_unlock_windows,
-       .brl_cancel_windows_fn = smb_full_audit_brl_cancel_windows,
        .strict_lock_check_fn = smb_full_audit_strict_lock_check,
        .translate_name_fn = smb_full_audit_translate_name,
        .fsctl_fn = smb_full_audit_fsctl,
index a9415952b4e6d99c91991ecefe1fee80083aea22..e8617215355b44ee4a8992e905c546fc985275b2 100644 (file)
@@ -1663,7 +1663,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
 
        .brl_lock_windows_fn = NULL,
        .brl_unlock_windows_fn = NULL,
-       .brl_cancel_windows_fn = NULL,
        .strict_lock_check_fn = NULL,
        .translate_name_fn = NULL,
        .fsctl_fn = NULL,
index 214390204a5b194b7c51cead13f6a010044e048a..d3aca89906715ec8b1302eaa6619fe4a8f4dd215 100644 (file)
@@ -658,14 +658,6 @@ bool vfs_not_implemented_brl_unlock_windows(struct vfs_handle_struct *handle,
        return false;
 }
 
-bool vfs_not_implemented_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                           struct byte_range_lock *br_lck,
-                                           struct lock_struct *plock)
-{
-       errno = ENOSYS;
-       return false;
-}
-
 bool vfs_not_implemented_strict_lock_check(struct vfs_handle_struct *handle,
                                           struct files_struct *fsp,
                                           struct lock_struct *plock)
@@ -1108,7 +1100,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
        .connectpath_fn = vfs_not_implemented_connectpath,
        .brl_lock_windows_fn = vfs_not_implemented_brl_lock_windows,
        .brl_unlock_windows_fn = vfs_not_implemented_brl_unlock_windows,
-       .brl_cancel_windows_fn = vfs_not_implemented_brl_cancel_windows,
        .strict_lock_check_fn = vfs_not_implemented_strict_lock_check,
        .translate_name_fn = vfs_not_implemented_translate_name,
        .fsctl_fn = vfs_not_implemented_fsctl,
index a89c6be9f71ef6c20889aac800fa4b6f09aa011d..96847a4fde904ea54c35c9c1aa52b0c734a144c2 100644 (file)
@@ -1633,27 +1633,6 @@ static bool smb_time_audit_brl_unlock_windows(struct vfs_handle_struct *handle,
        return result;
 }
 
-static bool smb_time_audit_brl_cancel_windows(struct vfs_handle_struct *handle,
-                                             struct byte_range_lock *br_lck,
-                                             struct lock_struct *plock)
-{
-       bool result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_BRL_CANCEL_WINDOWS(handle, br_lck, plock);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fsp("brl_cancel_windows", timediff,
-                                      brl_fsp(br_lck));
-       }
-
-       return result;
-}
-
 static bool smb_time_audit_strict_lock_check(struct vfs_handle_struct *handle,
                                             struct files_struct *fsp,
                                             struct lock_struct *plock)
@@ -2859,7 +2838,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .connectpath_fn = smb_time_audit_connectpath,
        .brl_lock_windows_fn = smb_time_audit_brl_lock_windows,
        .brl_unlock_windows_fn = smb_time_audit_brl_unlock_windows,
-       .brl_cancel_windows_fn = smb_time_audit_brl_cancel_windows,
        .strict_lock_check_fn = smb_time_audit_strict_lock_check,
        .translate_name_fn = smb_time_audit_translate_name,
        .fsctl_fn = smb_time_audit_fsctl,