diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-07 08:12:54 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-08 10:56:26 +0200 |
commit | 1969aa8eacd257951cdc8d13110302c3b9388013 (patch) | |
tree | db36becce95919c7e94d524dd0fd31c5241c1d15 | |
parent | 5c3e985fb53e7e210d665a6fc8199b0844019340 (diff) | |
download | samba-1969aa8eacd257951cdc8d13110302c3b9388013.tar.gz samba-1969aa8eacd257951cdc8d13110302c3b9388013.tar.bz2 samba-1969aa8eacd257951cdc8d13110302c3b9388013.zip |
s4-ntvfs: Rename brl_*() -> brlock_*() to avoid conflict with brlock_init in s3
-rw-r--r-- | source4/ntvfs/common/brlock.c | 18 | ||||
-rw-r--r-- | source4/ntvfs/common/brlock.h | 2 | ||||
-rw-r--r-- | source4/ntvfs/common/brlock_tdb.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_lock.c | 18 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.h | 2 |
7 files changed, 24 insertions, 24 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c index efb70226e6..142b4ff799 100644 --- a/source4/ntvfs/common/brlock.c +++ b/source4/ntvfs/common/brlock.c @@ -38,7 +38,7 @@ static const struct brlock_ops *ops; /* set the brl backend ops */ -void brl_set_ops(const struct brlock_ops *new_ops) +void brlock_set_ops(const struct brlock_ops *new_ops) { ops = new_ops; } @@ -47,7 +47,7 @@ void brl_set_ops(const struct brlock_ops *new_ops) Open up the brlock database. Close it down using talloc_free(). We need the imessaging_ctx to allow for pending lock notifications. */ -struct brl_context *brl_init(TALLOC_CTX *mem_ctx, struct server_id server, +struct brl_context *brlock_init(TALLOC_CTX *mem_ctx, struct server_id server, struct loadparm_context *lp_ctx, struct imessaging_context *imessaging_ctx) { @@ -57,7 +57,7 @@ struct brl_context *brl_init(TALLOC_CTX *mem_ctx, struct server_id server, return ops->brl_init(mem_ctx, server, lp_ctx, imessaging_ctx); } -struct brl_handle *brl_create_handle(TALLOC_CTX *mem_ctx, struct ntvfs_handle *ntvfs, DATA_BLOB *file_key) +struct brl_handle *brlock_create_handle(TALLOC_CTX *mem_ctx, struct ntvfs_handle *ntvfs, DATA_BLOB *file_key) { return ops->brl_create_handle(mem_ctx, ntvfs, file_key); } @@ -69,7 +69,7 @@ struct brl_handle *brl_create_handle(TALLOC_CTX *mem_ctx, struct ntvfs_handle *n someone else closing an overlapping lock range) a messaging notification is sent, identified by the notify_ptr */ -NTSTATUS brl_lock(struct brl_context *brl, +NTSTATUS brlock_lock(struct brl_context *brl, struct brl_handle *brlh, uint32_t smbpid, uint64_t start, uint64_t size, @@ -83,7 +83,7 @@ NTSTATUS brl_lock(struct brl_context *brl, /* Unlock a range of bytes. */ -NTSTATUS brl_unlock(struct brl_context *brl, +NTSTATUS brlock_unlock(struct brl_context *brl, struct brl_handle *brlh, uint32_t smbpid, uint64_t start, uint64_t size) @@ -96,7 +96,7 @@ NTSTATUS brl_unlock(struct brl_context *brl, given up trying to establish a lock or when they have succeeded in getting it. In either case they no longer need to be notified. */ -NTSTATUS brl_remove_pending(struct brl_context *brl, +NTSTATUS brlock_remove_pending(struct brl_context *brl, struct brl_handle *brlh, void *notify_ptr) { @@ -107,7 +107,7 @@ NTSTATUS brl_remove_pending(struct brl_context *brl, /* Test if we are allowed to perform IO on a region of an open file */ -NTSTATUS brl_locktest(struct brl_context *brl, +NTSTATUS brlock_locktest(struct brl_context *brl, struct brl_handle *brlh, uint32_t smbpid, uint64_t start, uint64_t size, @@ -120,7 +120,7 @@ NTSTATUS brl_locktest(struct brl_context *brl, /* Remove any locks associated with a open file. */ -NTSTATUS brl_close(struct brl_context *brl, +NTSTATUS brlock_close(struct brl_context *brl, struct brl_handle *brlh) { return ops->brl_close(brl, brlh); @@ -129,7 +129,7 @@ NTSTATUS brl_close(struct brl_context *brl, /* Get a number of locks associated with a open file. */ -NTSTATUS brl_count(struct brl_context *brl, +NTSTATUS brlock_count(struct brl_context *brl, struct brl_handle *brlh, int *count) { diff --git a/source4/ntvfs/common/brlock.h b/source4/ntvfs/common/brlock.h index 7ae3111cc4..703538f073 100644 --- a/source4/ntvfs/common/brlock.h +++ b/source4/ntvfs/common/brlock.h @@ -52,7 +52,7 @@ struct brlock_ops { }; -void brl_set_ops(const struct brlock_ops *new_ops); +void brlock_set_ops(const struct brlock_ops *new_ops); void brl_tdb_init_ops(void); void brl_ctdb_init_ops(void); diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c index ab4d91c4db..3fd0edcc69 100644 --- a/source4/ntvfs/common/brlock_tdb.c +++ b/source4/ntvfs/common/brlock_tdb.c @@ -779,5 +779,5 @@ static const struct brlock_ops brlock_tdb_ops = { void brl_tdb_init_ops(void) { - brl_set_ops(&brlock_tdb_ops); + brlock_set_ops(&brlock_tdb_ops); } diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index 11757deea4..76bc73dad8 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -39,7 +39,7 @@ NTSTATUS pvfs_check_lock(struct pvfs_state *pvfs, return NT_STATUS_OK; } - return brl_locktest(pvfs->brl_context, + return brlock_locktest(pvfs->brl_context, f->brl_handle, smbpid, offset, count, rw); @@ -70,7 +70,7 @@ static void pvfs_lock_async_failed(struct pvfs_state *pvfs, { /* undo the locks we just did */ for (i--;i>=0;i--) { - brl_unlock(pvfs->brl_context, + brlock_unlock(pvfs->brl_context, f->brl_handle, locks[i].pid, locks[i].offset, @@ -127,7 +127,7 @@ static void pvfs_pending_lock_continue(void *private_data, enum pvfs_wait_notice * because with this we'll get the correct error code * FILE_LOCK_CONFLICT in the error case */ - status = brl_lock(pvfs->brl_context, + status = brlock_lock(pvfs->brl_context, f->brl_handle, locks[pending->pending_lock].pid, locks[pending->pending_lock].offset, @@ -143,7 +143,7 @@ static void pvfs_pending_lock_continue(void *private_data, enum pvfs_wait_notice don't need the pending lock any more */ if (NT_STATUS_IS_OK(status) || timed_out) { NTSTATUS status2; - status2 = brl_remove_pending(pvfs->brl_context, + status2 = brlock_remove_pending(pvfs->brl_context, f->brl_handle, pending); if (!NT_STATUS_IS_OK(status2)) { DEBUG(0,("pvfs_lock: failed to remove pending lock - %s\n", nt_errstr(status2))); @@ -177,7 +177,7 @@ static void pvfs_pending_lock_continue(void *private_data, enum pvfs_wait_notice pending->pending_lock = i; } - status = brl_lock(pvfs->brl_context, + status = brlock_lock(pvfs->brl_context, f->brl_handle, locks[i].pid, locks[i].offset, @@ -225,7 +225,7 @@ void pvfs_lock_close(struct pvfs_state *pvfs, struct pvfs_file *f) if (f->lock_count || f->pending_list) { DEBUG(5,("pvfs_lock: removing %.0f locks on close\n", (double)f->lock_count)); - brl_close(f->pvfs->brl_context, f->brl_handle); + brlock_close(f->pvfs->brl_context, f->brl_handle); f->lock_count = 0; } @@ -350,7 +350,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs, locks = lck->lockx.in.locks; for (i=0;i<lck->lockx.in.ulock_cnt;i++) { - status = brl_unlock(pvfs->brl_context, + status = brlock_unlock(pvfs->brl_context, f->brl_handle, locks[i].pid, locks[i].offset, @@ -369,7 +369,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs, pending->pending_lock = i; } - status = brl_lock(pvfs->brl_context, + status = brlock_lock(pvfs->brl_context, f->brl_handle, locks[i].pid, locks[i].offset, @@ -394,7 +394,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs, /* undo the locks we just did */ for (i--;i>=0;i--) { - brl_unlock(pvfs->brl_context, + brlock_unlock(pvfs->brl_context, f->brl_handle, locks[i].pid, locks[i].offset, diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 08a54f8e42..dfe2f2aa62 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -590,7 +590,7 @@ static NTSTATUS pvfs_brl_locking_handle(TALLOC_CTX *mem_ctx, data_blob_free(&odb_key); } - h = brl_create_handle(mem_ctx, ntvfs, &key); + h = brlock_create_handle(mem_ctx, ntvfs, &key); NT_STATUS_HAVE_NO_MEMORY(h); *_h = h; @@ -1569,7 +1569,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, f->handle->fd = fd; - status = brl_count(f->pvfs->brl_context, f->brl_handle, &count); + status = brlock_count(f->pvfs->brl_context, f->brl_handle, &count); if (!NT_STATUS_IS_OK(status)) { talloc_free(lck); return status; diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index b79ae957f3..4c1404eec5 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -249,7 +249,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, ntvfs->private_data = pvfs; - pvfs->brl_context = brl_init(pvfs, + pvfs->brl_context = brlock_init(pvfs, pvfs->ntvfs->ctx->server_id, pvfs->ntvfs->ctx->lp_ctx, pvfs->ntvfs->ctx->msg_ctx); diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index d60369df50..e1593a38cf 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -204,7 +204,7 @@ struct pvfs_file { /* a file handle to be used for byte range locking */ struct brl_handle *brl_handle; - /* a count of active locks - used to avoid calling brl_close on + /* a count of active locks - used to avoid calling brlock_close on file close */ uint64_t lock_count; |