X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=source3%2Flocking%2Fproto.h;h=2c9654ce28b8a8528c818aa4b7a88b6721bfb1e1;hb=c938a1065fed2a001da69b6a6d826ef31be75003;hp=c170c733010acad31f47b281aba4b1e511ed90c0;hpb=f0a5b791ae4e64e42270edad7a961aa046efbaac;p=mat%2Fsamba.git diff --git a/source3/locking/proto.h b/source3/locking/proto.h index c170c73301..2c9654ce28 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -25,12 +25,15 @@ /* The following definitions come from locking/brlock.c */ -bool brl_same_context(const struct lock_context *ctx1, - const struct lock_context *ctx2); -NTSTATUS brl_lock_failed(files_struct *fsp, const struct lock_struct *lock, bool blocking_lock); void brl_init(bool read_only); void brl_shutdown(void); +unsigned int brl_num_locks(const struct byte_range_lock *brl); +struct files_struct *brl_fsp(struct byte_range_lock *brl); +bool brl_have_read_oplocks(const struct byte_range_lock *brl); +void brl_set_have_read_oplocks(struct byte_range_lock *brl, + bool have_read_oplocks); + NTSTATUS brl_lock_windows_default(struct byte_range_lock *br_lck, struct lock_struct *plock, bool blocking_lock); @@ -97,6 +100,7 @@ void brl_revalidate(struct messaging_context *msg_ctx, uint32_t msg_type, struct server_id server_id, DATA_BLOB *data); +bool brl_cleanup_disconnected(struct file_id fid, uint64_t open_persistent_id); /* The following definitions come from locking/locking.c */ @@ -149,15 +153,15 @@ 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_existing_share_mode_lock(TALLOC_CTX *mem_ctx, - const struct file_id id); + struct file_id id); struct share_mode_lock *get_share_mode_lock( TALLOC_CTX *mem_ctx, - const struct file_id id, + 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); + struct file_id id); bool rename_share_filename(struct messaging_context *msg_ctx, struct share_mode_lock *lck, const char *servicepath, @@ -169,18 +173,13 @@ void get_file_infos(struct file_id id, bool *delete_on_close, 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 share_mode_stale_pid(struct share_mode_data *d, unsigned i); -void set_share_mode(struct share_mode_lock *lck, files_struct *fsp, +bool share_mode_stale_pid(struct share_mode_data *d, uint32_t idx); +bool 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); +void remove_stale_share_mode_entries(struct share_mode_data *d); 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); bool get_delete_on_close_token(struct share_mode_lock *lck, @@ -201,6 +200,9 @@ bool set_write_time(struct file_id fileid, struct timespec write_time); int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *, const char *, void *), void *private_data); +bool share_mode_cleanup_disconnected(struct file_id id, + uint64_t open_persistent_id); + /* The following definitions come from locking/posix.c */