diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-21 14:17:16 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-21 14:17:16 +1030 |
commit | 3a2a755e3380a8f81374009d463cd06161352507 (patch) | |
tree | a1394ae9bbb3732dc709562b47b36368c2a1439b /lib/tdb/common/tdb_private.h | |
parent | c23f1ee0c9342c6562166331c1b8bf9a2601a77c (diff) | |
download | samba-3a2a755e3380a8f81374009d463cd06161352507.tar.gz samba-3a2a755e3380a8f81374009d463cd06161352507.tar.bz2 samba-3a2a755e3380a8f81374009d463cd06161352507.zip |
tdb: use same expansion factor logic when expanding for new recovery area.
If we're expanding because the current recovery area is too small, we
expand only the amount we need. This can quickly lead to exponential
growth when we have a slowly-expanding record (hence a
slowly-expanding transaction size).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/common/tdb_private.h')
-rw-r--r-- | lib/tdb/common/tdb_private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tdb/common/tdb_private.h b/lib/tdb/common/tdb_private.h index 3c6aabffc7..4fc7381aa0 100644 --- a/lib/tdb/common/tdb_private.h +++ b/lib/tdb/common/tdb_private.h @@ -271,6 +271,7 @@ tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, uint32_t has struct tdb_record *rec); void tdb_io_init(struct tdb_context *tdb); int tdb_expand(struct tdb_context *tdb, tdb_off_t size); +tdb_off_t tdb_expand_adjust(tdb_off_t map_size, tdb_off_t size, int page_size); int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct tdb_record *rec); bool tdb_write_all(int fd, const void *buf, size_t count); |