1. 24 Mar, 2011 1 commit
    • Rusty Russell's avatar
      tdb2: fix two transaction bugs. · e1fd1d96
      Rusty Russell authored
      One but were we didn't update the map_size if we expanded the
      transaction but didn't create a new recovery area (most easily
      reproduced by setting the TDB_NOSYNC flag).
      
      Another out-by-one bug in transaction_direct where we would give
      read-access to the underlying file despite the last block having been
      modified.
      
      Both these were found by tdbtorture.
      e1fd1d96
  2. 23 Mar, 2011 1 commit
  3. 24 Mar, 2011 1 commit
  4. 23 Mar, 2011 2 commits
  5. 24 Mar, 2011 1 commit
    • Rusty Russell's avatar
      tdb2: check PID if we are holding a lock. · e6862ec8
      Rusty Russell authored
      tdb1 has tdb_reopen/tdb_reopen_all, which you are supposed to call
      after a fork().  But we can detect PID changes whenever we grab a lock,
      which is to say, before we do anything.
      
      We currently assume that pread and pwrite work, so the only problem
      with fork() is if we are holding locks and expect them to still be
      there in the child.  This is unusual, but most likely caused by a
      fork() inside a transaction.  In such cases, allow the child to unlock
      without complaint; they can then use the TDB as expected.
      
      Performance before and after shows no measurable speed difference:
      
      Total of 5 runs of tools/speed 100000:
      Before:
      	Adding: 18899ns
      	Finding: 7040ns
      	Missing: 5802ns
      	Traversing: 6466ns
      	Deleting: 12607ns
      	Re-adding: 14185ns
      	Appending: 20770ns
      	Churning: 93845ns
      
      After:
      	Adding: 18073ns
      	Finding: 6795ns
      	Missing: 5549ns
      	Traversing: 6333ns
      	Deleting: 12313ns
      	Re-adding: 13835ns
      	Appending: 20343ns
      	Churning: 92208ns
      e6862ec8
  6. 22 Mar, 2011 1 commit
  7. 28 Mar, 2011 1 commit
  8. 25 Mar, 2011 2 commits
    • Rusty Russell's avatar
      failtest: handle EINTR from poll. · b0a59bdc
      Rusty Russell authored
      I don't quite know why, but this started happening to me.  We should
      handle it anyway.
      b0a59bdc
    • Rusty Russell's avatar
      ccanlint: fix listing of dependencies · 94b797a5
      Rusty Russell authored
      gcc gave a warning:
      	tools/ccanlint/ccanlint.c:230:19: error: ‘c’ may be used uninitialized in this function
      
      Which indicated that test dependency printing was broken: we need to
      loop through the tests!  Also, we haven't parsed options yet, so
      verbose is never true: move it to later and make it depend on -vvv.
      94b797a5
  9. 24 Mar, 2011 1 commit
  10. 22 Mar, 2011 24 commits
  11. 21 Mar, 2011 5 commits