git.samba.org
/
mat
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tdb: use same expansion factor logic when expanding for new recovery area.
[mat/samba.git]
/
lib
/
tdb
/
common
/
transaction.c
diff --git
a/lib/tdb/common/transaction.c
b/lib/tdb/common/transaction.c
index 66ecbfdefb6ef827681eebaf2bb3230bf0b386b1..f7d56a05a3650315bed4646d6e650c6d62e405d3 100644
(file)
--- a/
lib/tdb/common/transaction.c
+++ b/
lib/tdb/common/transaction.c
@@
-730,7
+730,11
@@
static int tdb_recovery_allocate(struct tdb_context *tdb,
*recovery_size = tdb_recovery_size(tdb);
/* round up to a multiple of page size */
*recovery_size = tdb_recovery_size(tdb);
/* round up to a multiple of page size */
- *recovery_max_size = TDB_ALIGN(sizeof(rec) + *recovery_size, tdb->page_size) - sizeof(rec);
+ *recovery_max_size = tdb_expand_adjust(tdb->map_size,
+ *recovery_size,
+ tdb->page_size)
+ - sizeof(rec);
+
*recovery_offset = tdb->map_size;
recovery_head = *recovery_offset;
*recovery_offset = tdb->map_size;
recovery_head = *recovery_offset;