Changeset 988 for vendor/current/source3/locking/proto.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/locking/proto.h
r746 r988 26 26 /* The following definitions come from locking/brlock.c */ 27 27 28 bool brl_same_context(const struct lock_context *ctx1,29 const struct lock_context *ctx2);30 NTSTATUS brl_lock_failed(files_struct *fsp, const struct lock_struct *lock, bool blocking_lock);31 28 void brl_init(bool read_only); 32 29 void brl_shutdown(void); 30 31 unsigned int brl_num_locks(const struct byte_range_lock *brl); 32 struct files_struct *brl_fsp(struct byte_range_lock *brl); 33 uint32_t brl_num_read_oplocks(const struct byte_range_lock *brl); 34 void brl_set_num_read_oplocks(struct byte_range_lock *brl, 35 uint32_t num_read_oplocks); 33 36 34 37 NTSTATUS brl_lock_windows_default(struct byte_range_lock *br_lck, … … 45 48 enum brl_flavour lock_flav, 46 49 bool blocking_lock, 47 uint64_t *psmblctx, 48 struct blocking_lock_record *blr); 50 uint64_t *psmblctx); 49 51 bool brl_unlock(struct messaging_context *msg_ctx, 50 52 struct byte_range_lock *br_lck, … … 58 60 const struct lock_struct *plock); 59 61 bool brl_locktest(struct byte_range_lock *br_lck, 60 uint64_t smblctx, 61 struct server_id pid, 62 br_off start, 63 br_off size, 64 enum brl_type lock_type, 65 enum brl_flavour lock_flav); 62 const struct lock_struct *rw_probe); 66 63 NTSTATUS brl_lockquery(struct byte_range_lock *br_lck, 67 64 uint64_t *psmblctx, … … 76 73 br_off start, 77 74 br_off size, 78 enum brl_flavour lock_flav, 79 struct blocking_lock_record *blr); 75 enum brl_flavour lock_flav); 80 76 bool brl_lock_cancel_default(struct byte_range_lock *br_lck, 81 77 struct lock_struct *plock); 78 bool brl_mark_disconnected(struct files_struct *fsp); 79 bool brl_reconnect_disconnected(struct files_struct *fsp); 82 80 void brl_close_fnum(struct messaging_context *msg_ctx, 83 81 struct byte_range_lock *br_lck); … … 91 89 files_struct *fsp); 92 90 struct byte_range_lock *brl_get_locks_readonly(files_struct *fsp); 93 void brl_register_msgs(struct messaging_context *msg_ctx); 91 void brl_revalidate(struct messaging_context *msg_ctx, 92 void *private_data, 93 uint32_t msg_type, 94 struct server_id server_id, 95 DATA_BLOB *data); 96 bool brl_cleanup_disconnected(struct file_id fid, uint64_t open_persistent_id); 94 97 95 98 /* The following definitions come from locking/locking.c */ … … 122 125 bool blocking_lock, 123 126 NTSTATUS *perr, 124 uint64_t *psmblctx, 125 struct blocking_lock_record *blr); 127 uint64_t *psmblctx); 126 128 NTSTATUS do_unlock(struct messaging_context *msg_ctx, 127 129 files_struct *fsp, … … 131 133 enum brl_flavour lock_flav); 132 134 NTSTATUS do_lock_cancel(files_struct *fsp, 133 uint64 smblctx,135 uint64_t smblctx, 134 136 uint64_t count, 135 137 uint64_t offset, 136 enum brl_flavour lock_flav, 137 struct blocking_lock_record *blr); 138 enum brl_flavour lock_flav); 138 139 void locking_close_file(struct messaging_context *msg_ctx, 139 140 files_struct *fsp, … … 143 144 bool locking_end(void); 144 145 char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e); 145 struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx, 146 const struct file_id id, 147 const char *servicepath, 148 const struct smb_filename *smb_fname, 149 const struct timespec *old_write_time); 146 struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx, 147 struct file_id id); 148 struct share_mode_lock *get_share_mode_lock( 149 TALLOC_CTX *mem_ctx, 150 struct file_id id, 151 const char *servicepath, 152 const struct smb_filename *smb_fname, 153 const struct timespec *old_write_time); 150 154 struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx, 151 conststruct file_id id);155 struct file_id id); 152 156 bool rename_share_filename(struct messaging_context *msg_ctx, 153 157 struct share_mode_lock *lck, 158 struct file_id id, 154 159 const char *servicepath, 155 160 uint32_t orig_name_hash, … … 161 166 struct timespec *write_time); 162 167 bool is_valid_share_mode_entry(const struct share_mode_entry *e); 163 bool is_deferred_open_entry(const struct share_mode_entry *e); 164 bool is_unused_share_mode_entry(const struct share_mode_entry *e); 165 void set_share_mode(struct share_mode_lock *lck, files_struct *fsp, 166 uid_t uid, uint64_t mid, uint16 op_type); 167 void add_deferred_open(struct share_mode_lock *lck, uint64_t mid, 168 struct timeval request_time, 169 struct server_id pid, struct file_id id); 168 bool share_mode_stale_pid(struct share_mode_data *d, uint32_t idx); 169 bool set_share_mode(struct share_mode_lock *lck, struct files_struct *fsp, 170 uid_t uid, uint64_t mid, uint16_t op_type, 171 uint32_t lease_idx); 172 void remove_stale_share_mode_entries(struct share_mode_data *d); 170 173 bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp); 171 void del_deferred_open_entry(struct share_mode_lock *lck, uint64_t mid,172 struct server_id pid);174 bool mark_share_mode_disconnected(struct share_mode_lock *lck, 175 struct files_struct *fsp); 173 176 bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp); 174 177 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp); 175 NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode); 178 struct share_mode_lease; 179 NTSTATUS downgrade_share_lease(struct smbd_server_connection *sconn, 180 struct share_mode_lock *lck, 181 const struct smb2_lease_key *key, 182 uint32_t new_lease_state, 183 struct share_mode_lease **_l); 176 184 bool get_delete_on_close_token(struct share_mode_lock *lck, 177 uint32_t name_hash, 178 const struct security_token **pp_nt_tok, 179 const struct security_unix_token **pp_tok); 185 uint32_t name_hash, 186 const struct security_token **pp_nt_tok, 187 const struct security_unix_token **pp_tok); 188 void reset_delete_on_close_lck(files_struct *fsp, 189 struct share_mode_lock *lck); 180 190 void set_delete_on_close_lck(files_struct *fsp, 181 191 struct share_mode_lock *lck, 182 bool delete_on_close,183 192 const struct security_token *nt_tok, 184 193 const struct security_unix_token *tok); … … 189 198 bool set_sticky_write_time(struct file_id fileid, struct timespec write_time); 190 199 bool set_write_time(struct file_id fileid, struct timespec write_time); 191 int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *, 200 struct timespec get_share_mode_write_time(struct share_mode_lock *lck); 201 int share_mode_forall(int (*fn)(struct file_id fid, 202 const struct share_mode_data *data, 203 void *private_data), 204 void *private_data); 205 int share_entry_forall(int (*fn)(const struct share_mode_entry *, 206 const char *, const char *, 192 207 const char *, void *), 193 208 void *private_data); 209 bool share_mode_cleanup_disconnected(struct file_id id, 210 uint64_t open_persistent_id); 211 194 212 195 213 /* The following definitions come from locking/posix.c */ … … 202 220 bool posix_locking_init(bool read_only); 203 221 bool posix_locking_end(void); 204 void reduce_windows_lock_ref_count(files_struct *fsp, unsigned int dcount);205 222 int fd_close_posix(struct files_struct *fsp); 206 223 bool set_posix_lock_windows_flavour(files_struct *fsp,
Note:
See TracChangeset
for help on using the changeset viewer.