summaryrefslogtreecommitdiff
path: root/lib/tdb/common/transaction.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-03-25 10:19:48 +0100
committerVolker Lendecke <vl@samba.org>2010-03-25 10:24:45 +0100
commitea8e0d5d54b020c530e392c4edaeed43e20af303 (patch)
tree550ea6372e166df4b7d2fc02261a23012676f7a9 /lib/tdb/common/transaction.c
parent0a65bb57a18176a4aaa6972c025062577b124ee7 (diff)
downloadsamba-ea8e0d5d54b020c530e392c4edaeed43e20af303.tar.gz
samba-ea8e0d5d54b020c530e392c4edaeed43e20af303.tar.bz2
samba-ea8e0d5d54b020c530e392c4edaeed43e20af303.zip
Fix some nonempty blank lines
Diffstat (limited to 'lib/tdb/common/transaction.c')
-rw-r--r--lib/tdb/common/transaction.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index 4f1cc708ef..504d0f681a 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -8,7 +8,7 @@
** NOTE! The following LGPL license applies to the tdb
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@@ -59,7 +59,7 @@
- allow for nested calls to tdb_transaction_start(), re-using the
existing transaction record. If the inner transaction is cancelled
then a subsequent commit will fail
-
+
- keep a mirrored copy of the tdb hash chain heads to allow for the
fast hash heads scan on traverse, updating the mirrored copy in
the transaction version of tdb_write
@@ -185,7 +185,7 @@ static int transaction_read(struct tdb_context *tdb, tdb_off_t off, void *buf,
goto fail;
}
}
-
+
/* now copy it out of this block */
memcpy(buf, tdb->transaction->blocks[blk] + (off % tdb->transaction->block_size), len);
if (cv) {
@@ -292,7 +292,7 @@ static int transaction_write(struct tdb_context *tdb, tdb_off_t off,
}
}
}
-
+
/* overwrite part of an existing block */
if (buf == NULL) {
memset(tdb->transaction->blocks[blk] + off, 0, len);
@@ -478,7 +478,7 @@ int tdb_transaction_start(struct tdb_context *tdb)
SAFE_FREE(tdb->transaction);
return -1;
}
-
+
/* get a read lock from the freelist to the end of file. This
is upgraded to a write lock during the commit */
if (tdb_allrecord_lock(tdb, F_RDLCK, TDB_LOCK_WAIT, true) == -1) {
@@ -514,7 +514,7 @@ int tdb_transaction_start(struct tdb_context *tdb)
/* Trace at the end, so we get sequence number correct. */
tdb_trace(tdb, "tdb_transaction_start");
return 0;
-
+
fail:
tdb_allrecord_unlock(tdb, F_RDLCK, false);
fail_allrecord_lock:
@@ -601,7 +601,7 @@ static int _tdb_transaction_cancel(struct tdb_context *tdb)
SAFE_FREE(tdb->transaction->hash_heads);
SAFE_FREE(tdb->transaction);
-
+
return ret;
}
@@ -787,7 +787,7 @@ static int transaction_setup_recovery(struct tdb_context *tdb,
if (i == tdb->transaction->num_blocks-1) {
length = tdb->transaction->last_block_size;
}
-
+
if (offset >= old_map_size) {
continue;
}
@@ -900,7 +900,7 @@ static int _tdb_transaction_prepare_commit(struct tdb_context *tdb)
}
methods = tdb->transaction->io_methods;
-
+
/* if there are any locks pending then the caller has not
nested their locks properly, so fail the transaction */
if (tdb_have_extra_locks(tdb)) {
@@ -1024,7 +1024,7 @@ int tdb_transaction_commit(struct tdb_context *tdb)
if (methods->tdb_write(tdb, offset, tdb->transaction->blocks[i], length) == -1) {
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_commit: write failed during commit\n"));
-
+
/* we've overwritten part of the data and
possibly expanded the file, so we need to
run the crash recovery code */
@@ -1179,7 +1179,7 @@ int tdb_transaction_recover(struct tdb_context *tdb)
tdb->ecode = TDB_ERR_IO;
return -1;
}
-
+
if (transaction_sync(tdb, 0, recovery_eof) == -1) {
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to sync2 recovery\n"));
tdb->ecode = TDB_ERR_IO;