1. 27 Apr, 2011 2 commits
    • Rusty Russell's avatar
      tdb2: allow multiple chain locks. · dc9da1e3
      Rusty Russell authored
      It's probably not a good idea, because it's a recipe for deadlocks if
      anyone else grabs any *other* two chainlocks, or the allrecord lock,
      but SAMBA definitely does it, so allow it as TDB1 does.
      dc9da1e3
    • Rusty Russell's avatar
      tdb2: TDB_ATTRIBUTE_STATS access via tdb_get_attribute. · 8cca0397
      Rusty Russell authored
      Now we have tdb_get_attribute, it makes sense to make that the method
      of accessing statistics.  That way they are always available, and it's
      probably cheaper doing the direct increment than even the unlikely()
      branch.
      8cca0397
  2. 07 Apr, 2011 4 commits
  3. 06 Apr, 2011 1 commit
  4. 07 Apr, 2011 1 commit
    • Rusty Russell's avatar
      tdb2: open hook for implementing TDB_CLEAR_IF_FIRST · 0468e699
      Rusty Russell authored
      This allows the caller to implement clear-if-first semantics as per
      TDB1.  The flag was removed for good reasons: performance and
      unreliability, but SAMBA3 still uses it widely, so this allows them to
      reimplement it themselves.
      
      (There is no way to do it without help like this from tdb2, since it has
       to be done under the open lock).
      0468e699
  5. 10 May, 2011 1 commit
    • Rusty Russell's avatar
      tdb2: cleanups for tools/speed.c · 4ee7bd08
      Rusty Russell authored
      1) The logging function needs to append a \n.
      2) The transaction start code should be after the comment and print.
      3) We should run tdb_check to make sure the database is OK after each op.
      4ee7bd08
  6. 07 Apr, 2011 3 commits
  7. 29 Mar, 2011 2 commits
  8. 19 Apr, 2011 1 commit
    • Rusty Russell's avatar
      tdb2: fix tdb_summary reports · 63e80faf
      Rusty Russell authored
      1) Fix the bogus reporting of uncoalesced runs: there has to be more than 1
         free record to make a "run", and any other record interrups the run.
      2) Fix the bogus data count in the top line (which was number of records,
         not bytes).
      3) Remove the count of free buckets: it's now a constant.
      63e80faf
  9. 28 Apr, 2011 4 commits
  10. 27 Apr, 2011 5 commits
  11. 19 Apr, 2011 2 commits
  12. 06 Apr, 2011 1 commit
    • Rusty Russell's avatar
      typesafe_cb: simplify, preserve namespace. · b0fa019a
      Rusty Russell authored
      Get rid of many variants, which were just confusing for most people.
      Keep typesafe_cb(), typesafe_cb_preargs() and typesafe_cb_postarts(),
      and rework cast_if_type() into typesafe_cb_cast() so we stay in our
      namespace.
      
      I should have done this as soon as I discovered the limitation that
      the types have to be defined if I want const-taking callbacks.
      b0fa019a
  13. 19 Apr, 2011 3 commits
  14. 02 Apr, 2011 8 commits
  15. 28 Mar, 2011 2 commits