summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2023-04-13 13:17:08 +0200
committerAndreas Schneider <asn@cryptomilk.org>2023-04-14 05:25:33 +0000
commit2afd7b1bb86a7454a960bacafc9dc9df0ba68dfc (patch)
tree5d3745f5a16e204d13cac60efe71d7c9beb10088 /lib/tdb
parentb6de03c74c28b6ef3517801260e02fde802b5fdb (diff)
downloadsamba-2afd7b1bb86a7454a960bacafc9dc9df0ba68dfc.tar.gz
lib:tdb: Fix code spelling
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/common/lock.c4
-rw-r--r--lib/tdb/common/mutex.c8
-rw-r--r--lib/tdb/common/open.c4
-rw-r--r--lib/tdb/common/transaction.c2
-rw-r--r--lib/tdb/common/traverse.c2
-rw-r--r--lib/tdb/docs/mutex.txt4
-rw-r--r--lib/tdb/test/lock-tracking.c2
7 files changed, 13 insertions, 13 deletions
diff --git a/lib/tdb/common/lock.c b/lib/tdb/common/lock.c
index c4e276f84d6..045ded95857 100644
--- a/lib/tdb/common/lock.c
+++ b/lib/tdb/common/lock.c
@@ -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);
diff --git a/lib/tdb/common/mutex.c b/lib/tdb/common/mutex.c
index 78926db0be8..a7106164445 100644
--- a/lib/tdb/common/mutex.c
+++ b/lib/tdb/common/mutex.c
@@ -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
diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c
index f7f65b0e237..10233591dad 100644
--- a/lib/tdb/common/open.c
+++ b/lib/tdb/common/open.c
@@ -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)
{
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index 5ab38d0809f..78bbd7ad23e 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -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
diff --git a/lib/tdb/common/traverse.c b/lib/tdb/common/traverse.c
index d69e7dff285..fcd2e001be4 100644
--- a/lib/tdb/common/traverse.c
+++ b/lib/tdb/common/traverse.c
@@ -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.
diff --git a/lib/tdb/docs/mutex.txt b/lib/tdb/docs/mutex.txt
index a5a75420c1d..0003c7f64be 100644
--- a/lib/tdb/docs/mutex.txt
+++ b/lib/tdb/docs/mutex.txt
@@ -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
diff --git a/lib/tdb/test/lock-tracking.c b/lib/tdb/test/lock-tracking.c
index b2f092c0c4d..fb7706e9bcf 100644
--- a/lib/tdb/test/lock-tracking.c
+++ b/lib/tdb/test/lock-tracking.c
@@ -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>