dns: Use new DNS debugclass in DNS server
[kai/samba.git] / source3 / locking / proto.h
index b7c8990b1afa1252c2c04ee3c36668db40431c02..c170c733010acad31f47b281aba4b1e511ed90c0 100644 (file)
@@ -79,6 +79,8 @@ bool brl_lock_cancel(struct byte_range_lock *br_lck,
                struct blocking_lock_record *blr);
 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,
                    struct byte_range_lock *br_lck);
 int brl_forall(void (*fn)(struct file_id id, struct server_id pid,
@@ -90,7 +92,11 @@ int brl_forall(void (*fn)(struct file_id id, struct server_id pid,
 struct byte_range_lock *brl_get_locks(TALLOC_CTX *mem_ctx,
                                        files_struct *fsp);
 struct byte_range_lock *brl_get_locks_readonly(files_struct *fsp);
-void brl_register_msgs(struct messaging_context *msg_ctx);
+void brl_revalidate(struct messaging_context *msg_ctx,
+                   void *private_data,
+                   uint32_t msg_type,
+                   struct server_id server_id,
+                   DATA_BLOB *data);
 
 /* The following definitions come from locking/locking.c  */
 
@@ -142,11 +148,14 @@ bool locking_init(void);
 bool locking_init_readonly(void);
 bool locking_end(void);
 char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e);
-struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
-                                           const struct file_id id,
-                                           const char *servicepath,
-                                           const struct smb_filename *smb_fname,
-                                           const struct timespec *old_write_time);
+struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
+                                                    const struct file_id id);
+struct share_mode_lock *get_share_mode_lock(
+       TALLOC_CTX *mem_ctx,
+       const struct file_id id,
+       const char *servicepath,
+       const struct smb_filename *smb_fname,
+       const struct timespec *old_write_time);
 struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
                                                  const struct file_id id);
 bool rename_share_filename(struct messaging_context *msg_ctx,
@@ -161,24 +170,31 @@ void get_file_infos(struct file_id id,
                    struct timespec *write_time);
 bool is_valid_share_mode_entry(const struct share_mode_entry *e);
 bool is_deferred_open_entry(const struct share_mode_entry *e);
-bool is_unused_share_mode_entry(const struct share_mode_entry *e);
+bool share_mode_stale_pid(struct share_mode_data *d, unsigned i);
 void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
                    uid_t uid, uint64_t mid, uint16 op_type);
 void add_deferred_open(struct share_mode_lock *lck, uint64_t mid,
                       struct timeval request_time,
                       struct server_id pid, struct file_id id);
 bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp);
+bool mark_share_mode_disconnected(struct share_mode_lock *lck,
+                                 struct files_struct *fsp);
 void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid,
                             struct server_id pid);
 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
-NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode);
-const struct security_unix_token *get_delete_on_close_token(struct share_mode_lock *lck, uint32_t name_hash);
+bool get_delete_on_close_token(struct share_mode_lock *lck,
+                               uint32_t name_hash,
+                               const struct security_token **pp_nt_tok,
+                               const struct security_unix_token **pp_tok);
 void set_delete_on_close_lck(files_struct *fsp,
                        struct share_mode_lock *lck,
                        bool delete_on_close,
+                       const struct security_token *nt_tok,
+                       const struct security_unix_token *tok);
+bool set_delete_on_close(files_struct *fsp, bool delete_on_close,
+                       const struct security_token *nt_tok,
                        const struct security_unix_token *tok);
-bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const struct security_unix_token *tok);
 bool is_delete_on_close_set(struct share_mode_lock *lck, uint32_t name_hash);
 bool set_sticky_write_time(struct file_id fileid, struct timespec write_time);
 bool set_write_time(struct file_id fileid, struct timespec write_time);
@@ -195,7 +211,6 @@ bool is_posix_locked(files_struct *fsp,
                        enum brl_flavour lock_flav);
 bool posix_locking_init(bool read_only);
 bool posix_locking_end(void);
-void reduce_windows_lock_ref_count(files_struct *fsp, unsigned int dcount);
 int fd_close_posix(struct files_struct *fsp);
 bool set_posix_lock_windows_flavour(files_struct *fsp,
                        uint64_t u_offset,