git: libc/db: Sync with FreeBSD

Peter Avalos pavalos at crater.dragonflybsd.org
Tue Jul 30 18:14:38 PDT 2013


commit abd448c3b2d3508465e48d9cfdb163ef88fc242e
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date:   Sun Jun 2 07:22:33 2013 -0700

    libc/db: Sync with FreeBSD
    
    - libc/db/hash: cap auto-tuned block size with a value that actually
      works
    - Consider flag == 0 as the same of flag == R_NEXT
    - Minor changes from Berkeley DB 1.86 and further improvements from
      OpenBSD
    - Allow O_SYNC and O_NOFOLLOW flags in dbopen()
    - Plug memory leaks and a potential NULL dereference
    - Simplify the logic when determining whether to zero out a db file to
      after open().
    - When deleting a big key, the offset of an empty page should be bsize,
      not bsize-1
    - Avoid overwriting the cursor page when the cursor page becomes the LRU
      page.
    - Fix for sequential retrieval failure when using large key/data pairs.
    - Fix a crash when iterating over a hash and removing its elements.
    - Only squeeze a short key/value pair onto a page with other complete
      key/value pairs
    - Return meaningful errno in overflow case
    - Save errno before calling _close(), which may clear it
    - Explicitly specify bit width for on-disk data structure.
    
    Obtained-from:   FreeBSD

Summary of changes:
 include/db.h                          |  82 ++++++------
 include/mpool.h                       |  61 ++++-----
 include/ndbm.h                        |  34 ++---
 lib/libc/db/README                    |   9 +-
 lib/libc/db/btree/Makefile.inc        |   3 +-
 lib/libc/db/btree/bt_close.c          |   8 +-
 lib/libc/db/btree/bt_conv.c           |  52 ++++----
 lib/libc/db/btree/bt_debug.c          |  51 ++++----
 lib/libc/db/btree/bt_delete.c         |  36 +++---
 lib/libc/db/btree/bt_get.c            |   4 +-
 lib/libc/db/btree/bt_open.c           |  49 +++----
 lib/libc/db/btree/bt_overflow.c       |  18 +--
 lib/libc/db/btree/bt_page.c           |   4 +-
 lib/libc/db/btree/bt_put.c            |  26 ++--
 lib/libc/db/btree/bt_search.c         |  18 +--
 lib/libc/db/btree/bt_seq.c            |  24 ++--
 lib/libc/db/btree/bt_split.c          |  36 +++---
 lib/libc/db/btree/bt_utils.c          |  19 ++-
 lib/libc/db/btree/btree.h             |  91 ++++++-------
 lib/libc/db/btree/extern.h            |  64 +++++----
 lib/libc/db/db/Makefile.inc           |   3 +-
 lib/libc/db/db/db.c                   |  30 +++--
 lib/libc/db/docs/hash.usenix.ps       |   3 +-
 lib/libc/db/docs/libtp.usenix.ps      |   3 +-
 lib/libc/db/hash/Makefile.inc         |   3 +-
 lib/libc/db/hash/README               |   5 +-
 lib/libc/db/hash/extern.h             |  50 +++----
 lib/libc/db/hash/hash.c               | 158 ++++++++++++-----------
 lib/libc/db/hash/hash.h               |  59 +++++----
 lib/libc/db/hash/hash_bigkey.c        | 154 +++++++++++-----------
 lib/libc/db/hash/hash_buf.c           |  63 +++++----
 lib/libc/db/hash/hash_func.c          | 116 ++++++++---------
 lib/libc/db/hash/hash_log2.c          |  10 +-
 lib/libc/db/hash/hash_page.c          | 237 ++++++++++++++++++----------------
 lib/libc/db/hash/ndbm.c               |  24 ++--
 lib/libc/db/hash/page.h               |  22 ++--
 lib/libc/db/man/btree.3               |  13 +-
 lib/libc/db/man/dbm.3                 |  13 +-
 lib/libc/db/man/dbopen.3              |  27 ++--
 lib/libc/db/man/hash.3                |  15 +--
 lib/libc/db/man/mpool.3               |  68 +++++-----
 lib/libc/db/man/recno.3               |  13 +-
 lib/libc/db/mpool/mpool.c             | 130 +++++++++++++------
 lib/libc/db/mpool/mpool.libtp         |   3 +-
 lib/libc/db/recno/Makefile.inc        |   3 +-
 lib/libc/db/recno/extern.h            |  36 +++---
 lib/libc/db/recno/rec_close.c         |  14 +-
 lib/libc/db/recno/rec_delete.c        |  10 +-
 lib/libc/db/recno/rec_get.c           |  43 +++---
 lib/libc/db/recno/rec_open.c          |  11 +-
 lib/libc/db/recno/rec_put.c           |  33 +++--
 lib/libc/db/recno/rec_search.c        |  24 ++--
 lib/libc/db/recno/rec_seq.c           |   6 +-
 lib/libc/db/recno/rec_utils.c         |  12 +-
 lib/libc/db/recno/recno.h             |   2 +-
 lib/libc/db/test/Makefile             |   1 +
 lib/libc/db/test/btree.tests/main.c   |  52 ++++----
 lib/libc/db/test/dbtest.c             |  39 +++---
 lib/libc/db/test/hash.tests/driver2.c |   3 +-
 lib/libc/db/test/hash.tests/tcreat3.c |   3 +-
 lib/libc/db/test/hash.tests/tdel.c    |   3 +-
 lib/libc/db/test/hash.tests/thash4.c  |   3 +-
 lib/libc/db/test/hash.tests/tread2.c  |   3 +-
 lib/libc/db/test/hash.tests/tseq.c    |   3 +-
 lib/libc/db/test/hash.tests/tverify.c |   3 +-
 sys/sys/param.h                       |   6 +
 66 files changed, 1128 insertions(+), 1096 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/abd448c3b2d3508465e48d9cfdb163ef88fc242e


-- 
DragonFly BSD source repository



More information about the Commits mailing list