*** samba-3.2.15/source/lib/tdb/common/io.c 2009-09-30 15:24:50.000000000 +0300 --- samba-3.2.15.patched/source/lib/tdb/common/io.c 2009-10-23 17:56:24.000000000 +0300 *************** *** 306,316 **** /* 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 100 more records, and at ! least 25% more space. Round the database up to a multiple ! of the page size */ ! new_size = MAX(tdb->map_size + size*100, tdb->map_size * 1.25); ! size = TDB_ALIGN(new_size, tdb->page_size) - tdb->map_size; if (!(tdb->flags & TDB_INTERNAL)) tdb_munmap(tdb); --- 306,314 ---- /* 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 ! the database up to a multiple of the page size */ ! size = TDB_ALIGN(tdb->map_size + size*10, tdb->page_size) - tdb->map_size; if (!(tdb->flags & TDB_INTERNAL)) tdb_munmap(tdb);