1. 17 Nov, 2010 1 commit
  2. 15 Nov, 2010 9 commits
    • Rusty Russell's avatar
      tdb2: fix tdb_chainlock · c5e3f07a
      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.
      c5e3f07a
    • Rusty Russell's avatar
      tdb2: fix coalesce race #3 · 06a5b1a8
      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.
      06a5b1a8
    • Rusty Russell's avatar
      tdb2: add TDB_COALESCING_MAGIC to solve coalescing race. · 56ea2c52
      Rusty Russell authored
      A new special record marker to indicate coalescing is in progress.
      56ea2c52
    • Rusty Russell's avatar
      tdb2: fix coalesce race #2 · d2a4d6b4
      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.
      d2a4d6b4
    • Rusty Russell's avatar
      tdb2: coalescing race fix #1 · b5479009
      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.
      b5479009
    • Rusty Russell's avatar
      tdb2: minor optimization for set_header · 8afb9681
      Rusty Russell authored
      We actually only need the bottom 5 bits of the hash value, so don't waste
      8 bytes passing it.
      8afb9681
    • Rusty Russell's avatar
      tdb2: hoist adjust_size · 590eee6f
      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.
      590eee6f
    • Rusty Russell's avatar
      tdb2: clean up makefile for tools · fdba839b
      Rusty Russell authored
      fdba839b
    • Rusty Russell's avatar
      tdb2: extra debugging checks · b371060f
      Rusty Russell authored
      b371060f
  3. 17 Nov, 2010 3 commits
  4. 15 Nov, 2010 6 commits
  5. 14 Nov, 2010 1 commit
  6. 15 Nov, 2010 1 commit
    • Rusty Russell's avatar
      ccanlint: fix idempotent handler · f1c96e9d
      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.
      f1c96e9d
  7. 14 Nov, 2010 1 commit
  8. 15 Nov, 2010 1 commit
  9. 14 Nov, 2010 1 commit
  10. 15 Nov, 2010 1 commit
  11. 11 Nov, 2010 1 commit
  12. 10 Nov, 2010 13 commits
  13. 09 Nov, 2010 1 commit