1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

lib:tdb: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Andreas Schneider 2023-04-13 13:17:08 +02:00 committed by Andreas Schneider
parent b6de03c74c
commit 2afd7b1bb8
7 changed files with 13 additions and 13 deletions

View File

@ -812,7 +812,7 @@ _PUBLIC_ int tdb_lockall_unmark(struct tdb_context *tdb)
return tdb_allrecord_unlock(tdb, F_WRLCK, true);
}
/* lock entire database with write lock - nonblocking varient */
/* lock entire database with write lock - nonblocking variant */
_PUBLIC_ int tdb_lockall_nonblock(struct tdb_context *tdb)
{
int ret = tdb_allrecord_lock(tdb, F_WRLCK, TDB_LOCK_NOWAIT, false);
@ -834,7 +834,7 @@ _PUBLIC_ int tdb_lockall_read(struct tdb_context *tdb)
return tdb_allrecord_lock(tdb, F_RDLCK, TDB_LOCK_WAIT, false);
}
/* lock entire database with read lock - nonblock varient */
/* lock entire database with read lock - nonblock variant */
_PUBLIC_ int tdb_lockall_read_nonblock(struct tdb_context *tdb)
{
int ret = tdb_allrecord_lock(tdb, F_RDLCK, TDB_LOCK_NOWAIT, false);

View File

@ -454,7 +454,7 @@ int tdb_mutex_allrecord_upgrade(struct tdb_context *tdb)
/*
* Our only caller tdb_allrecord_upgrade()
* garantees that we already own the allrecord lock.
* guarantees that we already own the allrecord lock.
*
* Which means m->allrecord_mutex is still locked by us.
*/
@ -502,7 +502,7 @@ void tdb_mutex_allrecord_downgrade(struct tdb_context *tdb)
/*
* Our only caller tdb_allrecord_upgrade() (in the error case)
* garantees that we already own the allrecord lock.
* guarantees that we already own the allrecord lock.
*
* Which means m->allrecord_mutex is still locked by us.
*/
@ -531,7 +531,7 @@ int tdb_mutex_allrecord_unlock(struct tdb_context *tdb)
/*
* Our only callers tdb_allrecord_unlock() and
* tdb_allrecord_lock() (in the error path)
* garantee that we already own the allrecord lock.
* guarantee that we already own the allrecord lock.
*
* Which means m->allrecord_mutex is still locked by us.
*/
@ -982,7 +982,7 @@ cleanup:
* tdb_robust_mutex_pid to -1. This is ok as this code path is only
* called once per process.
*
* Leaving our signal handler avoids races with other threads potentialy
* Leaving our signal handler avoids races with other threads potentially
* setting up their SIGCHLD handlers.
*
* The worst thing that can happen is that the other newer signal

View File

@ -94,7 +94,7 @@ static int tdb_new_database(struct tdb_context *tdb, struct tdb_header *header,
}
/*
* It's required for some following code pathes
* It's required for some following code paths
* to have the fields on 'tdb' up-to-date.
*
* E.g. tdb_mutex_size() requires it
@ -826,7 +826,7 @@ _PUBLIC_ int tdb_close(struct tdb_context *tdb)
return ret;
}
/* register a loging function */
/* register a logging function */
_PUBLIC_ void tdb_set_logging_function(struct tdb_context *tdb,
const struct tdb_logging_context *log_ctx)
{

View File

@ -68,7 +68,7 @@
although once a transaction is started then an exclusive lock is
gained until the transaction is committed or cancelled
- the commit stategy involves first saving away all modified data
- the commit strategy involves first saving away all modified data
into a linearised buffer in the transaction recovery area, then
marking the transaction recovery area with a magic value to
indicate a valid recovery record. In total 4 fsync/msync calls are

View File

@ -58,7 +58,7 @@ static tdb_off_t tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock
that we have done at least one fcntl lock at the
start of a search to guarantee that memory is
coherent on SMP systems. If records are added by
others during the search then thats OK, and we
others during the search then that's OK, and we
could possibly miss those with this trick, but we
could miss them anyway without this trick, so the
semantics don't change.

View File

@ -15,7 +15,7 @@ with a fcntl lock.
The external locking API of tdb also allows one to lock the complete database, and
ctdb uses this facility to freeze databases during a recovery. While the
so-called allrecord lock is held, all linked lists and all individual records
are frozen alltogether. Tdb achieves this by locking the complete file range
are frozen altogether. Tdb achieves this by locking the complete file range
with a single fcntl lock. Individual 1-byte locks for the linked lists
conflict with this. Access to records is prevented by the one large fnctl byte
range lock.
@ -73,7 +73,7 @@ The setpshared functions indicate to the kernel that the mutex is about to be
shared between processes in a common shared memory area.
The process shared posix mutexes have the potential to replace fcntl locking
to coordinate mmap access for tdbs. However, they are missing the criticial
to coordinate mmap access for tdbs. However, they are missing the critical
auto-cleanup property that fcntl provides when a process dies. A process that
dies hard while holding a shared mutex has no chance to clean up the protected
data structures and unlock the shared mutex. Thus with a pure process shared

View File

@ -1,4 +1,4 @@
/* We save the locks so we can reaquire them. */
/* We save the locks so we can reacquire them. */
#include "../common/tdb_private.h"
#include <unistd.h>
#include <fcntl.h>