diff --git a/ctdb/lib/tdb/common/freelist.c b/ctdb/lib/tdb/common/freelist.c index b109643f235..a2c594ada77 100644 --- a/ctdb/lib/tdb/common/freelist.c +++ b/ctdb/lib/tdb/common/freelist.c @@ -295,12 +295,7 @@ tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_st bestfit.rec_len = rec->rec_len; bestfit.rec_ptr = rec_ptr; bestfit.last_ptr = last_ptr; - /* consider a fit to be good enough if - we aren't wasting more than half - the space */ - if (bestfit.rec_len < 2*length) { - break; - } + break; } } diff --git a/ctdb/lib/tdb/common/io.c b/ctdb/lib/tdb/common/io.c index cc66b85b338..0c70603a59f 100644 --- a/ctdb/lib/tdb/common/io.c +++ b/ctdb/lib/tdb/common/io.c @@ -261,9 +261,9 @@ int tdb_expand(struct tdb_context *tdb, tdb_off_t size) /* must know about any previous expansions by another process */ tdb->methods->tdb_oob(tdb, tdb->map_size + 1, 1); - /* always make room for at least 10 more records, and round + /* always make room for at least 100 more records, and round the database up to a multiple of the page size */ - size = TDB_ALIGN(tdb->map_size + size*10, tdb->page_size) - tdb->map_size; + size = TDB_ALIGN(tdb->map_size + size*100, tdb->page_size) - tdb->map_size; if (!(tdb->flags & TDB_INTERNAL)) tdb_munmap(tdb); diff --git a/ctdb/tests/start_daemons.sh b/ctdb/tests/start_daemons.sh index 516353780d6..980dfc5067d 100755 --- a/ctdb/tests/start_daemons.sh +++ b/ctdb/tests/start_daemons.sh @@ -6,7 +6,6 @@ if [ $# -gt 0 ]; then fi NODES="nodes.txt" shift -shift rm -f nodes.txt for i in `seq 1 $NUMNODES`; do