- 23 Nov, 2010 1 commit
-
-
Rusty Russell authored
This wasn't fixed when we converted to ccan/opt in 8d706678. Unfortunately, unistd.h defines optarg, so the compiler didn't catch this.
-
- 17 Nov, 2010 5 commits
-
-
Rusty Russell authored
This adds chains of free tables: we choose one at random at the start and we iterate through them when they are exhausted. Currently there is no code to actually add a new free table, but we test that we can handle it if we add one in future.
-
Rusty Russell authored
Zones were a bad idea. They mean we can't simply add stuff to the end of the file (which transactions relied upon), and there's no good heuristic in how to size them. This patch reverts us to a single free table.
-
Rusty Russell authored
We were previously jumping straight from the first bucket to the end.
-
Rusty Russell authored
We were adding 50% to datalen twice, so move it out of adjust_size and make the callers do it. We also add a test that the heuristic is working at all.
-
Rusty Russell authored
We don't actually need it.
-
- 15 Nov, 2010 9 commits
-
-
Rusty Russell authored
We can't enlarge the lock without risking deadlock, so tdb_chainlock() can't simply grab a one-byte lock; it needs to grab the lock we'd need to protect the hash. In theory, tdb_chainlock_read() could use a one-byte lock though.
-
Rusty Russell authored
When we're coalescing, we need to drop the lock on the current free list, as we've enlarged the block and it may now belong in a different list. Unfortunately (as shown by repeated tdbtorture -n 8) another coalescing run can do the coalescing while we've dropped the lock. So for this case, we use the TDB_COALESCING_MAGIC flag so it doesn't look free.
-
Rusty Russell authored
A new special record marker to indicate coalescing is in progress.
-
Rusty Russell authored
When we find a free block, we need to mark it as used before we drop the free lock, even though we've removed it from the list. Otherwise the coalescing code can find it. This means handing the information we need down to lock_and_alloc, which also means we know when we're grabbing a "growing" entry, and can relax the heuristics about finding a good-sized block in that case.
-
Rusty Russell authored
When coalescing, we check the adjacent entry then lock its free list: we need to *recheck* after locking, to make sure it's still in that free list.
-
Rusty Russell authored
We actually only need the bottom 5 bits of the hash value, so don't waste 8 bytes passing it.
-
Rusty Russell authored
We're going to want it in get_free() in the next patch, so move it upwards. Trivial changes, too: add to size before min length check, and rename growing to want_extra.
-
Rusty Russell authored
-
Rusty Russell authored
-
- 17 Nov, 2010 3 commits
-
-
Rusty Russell authored
This supersedes the previous Fails: section, into a more general set of lines of form: <testname> <option>... With the special <option> "FAIL" to mean we know we fail this test. We accept options to valgrind-tests; in particular tdb2 wants --partial-loads-ok=yes passed to valgrind.
-
Rusty Russell authored
I wanted to see what happened with tdb2's valgrind test (suppressed in the _info file).
-
Rusty Russell authored
This allows tests (like in tdb2) to run the simpler tests first and build up, making it easier to spot the root cause of errors.
-
- 15 Nov, 2010 6 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
ccanlint complained about it; it's trivial but fixing it adds one point to our score.
-
Rusty Russell authored
ccanlint did this automatically.
-
Rusty Russell authored
Also, add Author and License lines to _info (ccanlint complained). Now ccanlint can build it as a module.
-
Rusty Russell authored
This makes it closer to compiling under ccanlint.
-
Rusty Russell authored
This means we can pass various compulation tests, but deduct points if they get warnings.
-
- 14 Nov, 2010 1 commit
-
-
Rusty Russell authored
We want to distinguish between warnings and errors: the first step is to return the output even if the command doesn't fail.
-
- 15 Nov, 2010 1 commit
-
-
Rusty Russell authored
Test for inserting idempotent header was wrong way around, and we check all headers at once, rather than finishing after one. Also, turn - into _ rather than removing.
-
- 14 Nov, 2010 1 commit
-
-
Rusty Russell authored
-
- 15 Nov, 2010 1 commit
-
-
Rusty Russell authored
This means we can see messages even if we don't fail; ie. for compiler warnings once they are no longer fatal. This means that various tests have to be more careful in not setting score->error.
-
- 14 Nov, 2010 1 commit
-
-
Rusty Russell authored
-
- 15 Nov, 2010 1 commit
-
-
Rusty Russell authored
We only grabbed one character at a time from stdin, so "y<return>" answered the next question as well.
-
- 11 Nov, 2010 1 commit
-
-
Rusty Russell authored
-
- 10 Nov, 2010 9 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
Michael Ellerman noted that ccan/opt has no symlink, so add ccanlint test.
-
Rusty Russell authored
-
Rusty Russell authored
-
Rusty Russell authored
I am told that CentOS 5.3 doesn't like isblank (it's ISO C).
-
Rusty Russell authored
Delio Brignoli points out that check_type fails when HAVE_TYPEOF is 0, so turn that off here and see what else breaks...
-
Rusty Russell authored
"C has fairly weak typing:" from check_type/_info is not a new section heading! Enforce that each word in multi-word sections must be caps.
-
Rusty Russell authored
We used to prefer to build up examples using previous ones, but this broke for tests which were to be executed. But list.h relied on the buildup behavior, so return to that unless we see "// Given" comments indicating an execution test.
-
Rusty Russell authored
gcc with optimization complained (correctly) about this.
-