summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-05-07 06:20:50 -0700
committerJeremy Allison <jra@samba.org>2010-05-07 06:20:50 -0700
commitadf4833792f36653bc8a854aeff47598a046dad6 (patch)
tree5b7855392d7204218df45563e09486957a3f6d9e /source3/include
parent6fd4861d9def34c4dccce214c78bfbcc0fa291fd (diff)
downloadsamba-adf4833792f36653bc8a854aeff47598a046dad6.tar.gz
samba-adf4833792f36653bc8a854aeff47598a046dad6.tar.bz2
samba-adf4833792f36653bc8a854aeff47598a046dad6.zip
This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context.
Jeremy.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/locking.h8
-rw-r--r--source3/include/proto.h32
2 files changed, 20 insertions, 20 deletions
diff --git a/source3/include/locking.h b/source3/include/locking.h
index ee59cad643..88104b0fef 100644
--- a/source3/include/locking.h
+++ b/source3/include/locking.h
@@ -36,7 +36,7 @@ enum brl_flavour {WINDOWS_LOCK = 0, POSIX_LOCK = 1};
this client */
struct lock_context {
- uint32 smbpid;
+ uint64_t smblctx;
uint16 tid;
struct server_id pid;
};
@@ -88,8 +88,8 @@ struct blocking_lock_record {
int lock_num;
uint64_t offset;
uint64_t count;
- uint32_t lock_pid;
- uint32_t blocking_pid; /* PID that blocks us. */
+ uint64_t smblctx;
+ uint64_t blocking_smblctx; /* Context that blocks us. */
enum brl_flavour lock_flav;
enum brl_type lock_type;
struct smb_request *req;
@@ -97,7 +97,7 @@ struct blocking_lock_record {
};
struct smbd_lock_element {
- uint32_t smbpid;
+ uint64_t smblctx;
enum brl_type brltype;
uint64_t offset;
uint64_t count;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f05f76b961..a3ba7472a8 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3374,18 +3374,18 @@ NTSTATUS brl_lock_windows_default(struct byte_range_lock *br_lck,
NTSTATUS brl_lock(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
- uint32 smbpid,
+ uint64_t smblctx,
struct server_id pid,
br_off start,
br_off size,
enum brl_type lock_type,
enum brl_flavour lock_flav,
bool blocking_lock,
- uint32 *psmbpid,
+ uint64_t *psmblctx,
struct blocking_lock_record *blr);
bool brl_unlock(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
- uint32 smbpid,
+ uint64_t smblctx,
struct server_id pid,
br_off start,
br_off size,
@@ -3394,21 +3394,21 @@ bool brl_unlock_windows_default(struct messaging_context *msg_ctx,
struct byte_range_lock *br_lck,
const struct lock_struct *plock);
bool brl_locktest(struct byte_range_lock *br_lck,
- uint32 smbpid,
+ uint64_t smblctx,
struct server_id pid,
br_off start,
br_off size,
enum brl_type lock_type,
enum brl_flavour lock_flav);
NTSTATUS brl_lockquery(struct byte_range_lock *br_lck,
- uint32 *psmbpid,
+ uint64_t *psmblctx,
struct server_id pid,
br_off *pstart,
br_off *psize,
enum brl_type *plock_type,
enum brl_flavour lock_flav);
bool brl_lock_cancel(struct byte_range_lock *br_lck,
- uint32 smbpid,
+ uint64_t smblctx,
struct server_id pid,
br_off start,
br_off size,
@@ -3434,7 +3434,7 @@ void brl_register_msgs(struct messaging_context *msg_ctx);
const char *lock_type_name(enum brl_type lock_type);
const char *lock_flav_name(enum brl_flavour lock_flav);
void init_strict_lock_struct(files_struct *fsp,
- uint32 smbpid,
+ uint64_t smblctx,
br_off start,
br_off size,
enum brl_type lock_type,
@@ -3444,30 +3444,30 @@ bool strict_lock_default(files_struct *fsp,
void strict_unlock_default(files_struct *fsp,
struct lock_struct *plock);
NTSTATUS query_lock(files_struct *fsp,
- uint32 *psmbpid,
+ uint64_t *psmblctx,
uint64_t *pcount,
uint64_t *poffset,
enum brl_type *plock_type,
enum brl_flavour lock_flav);
struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
files_struct *fsp,
- uint32 lock_pid,
+ uint64_t smblctx,
uint64_t count,
uint64_t offset,
enum brl_type lock_type,
enum brl_flavour lock_flav,
bool blocking_lock,
NTSTATUS *perr,
- uint32 *plock_pid,
+ uint64_t *psmblctx,
struct blocking_lock_record *blr);
NTSTATUS do_unlock(struct messaging_context *msg_ctx,
files_struct *fsp,
- uint32 lock_pid,
+ uint64_t smblctx,
uint64_t count,
uint64_t offset,
enum brl_flavour lock_flav);
NTSTATUS do_lock_cancel(files_struct *fsp,
- uint32 lock_pid,
+ uint64 smblctx,
uint64_t count,
uint64_t offset,
enum brl_flavour lock_flav,
@@ -5997,19 +5997,19 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck,
files_struct *fsp,
int lock_timeout,
int lock_num,
- uint32 lock_pid,
+ uint64_t smblctx,
enum brl_type lock_type,
enum brl_flavour lock_flav,
uint64_t offset,
uint64_t count,
- uint32 blocking_pid);
+ uint64_t blocking_smblctx);
void cancel_pending_lock_requests_by_fid(files_struct *fsp,
struct byte_range_lock *br_lck,
enum file_close_type close_type);
void remove_pending_lock_requests_by_mid_smb1(uint64_t mid);
bool blocking_lock_was_deferred_smb1(uint64_t mid);
struct blocking_lock_record *blocking_lock_cancel_smb1(files_struct *fsp,
- uint32 lock_pid,
+ uint64_t smblctx,
uint64_t offset,
uint64_t count,
enum brl_flavour lock_flav,
@@ -6868,7 +6868,7 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
int count,
bool target_is_directory);
void reply_copy(struct smb_request *req);
-uint32 get_lock_pid(const uint8_t *data, int data_offset,
+uint64_t get_lock_pid(const uint8_t *data, int data_offset,
bool large_file_format);
uint64_t get_lock_count(const uint8_t *data, int data_offset,
bool large_file_format);