diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2013-11-26 12:50:25 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2013-11-26 12:50:25 +0000 |
commit | 2992f3f66bb34468303d966934ac4a649d80cafd (patch) | |
tree | f7b3f2cd4652e6e11a942353f59a5e90c8114ddc /usr.sbin/nsd/udb.h | |
parent | 7c4dd1e2c9edff83947ea6f52b5e8b534d2c8000 (diff) |
import NSD 4.0.0, tests from Dorian Büttner, Patrik Lundin, requested by brad@
Diffstat (limited to 'usr.sbin/nsd/udb.h')
-rw-r--r-- | usr.sbin/nsd/udb.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/usr.sbin/nsd/udb.h b/usr.sbin/nsd/udb.h index 049760dd961..de7985275c2 100644 --- a/usr.sbin/nsd/udb.h +++ b/usr.sbin/nsd/udb.h @@ -40,13 +40,10 @@ typedef struct udb_base udb_base; typedef struct udb_alloc udb_alloc; -/** these checks are very slow, disabled by default */ -#if 0 /** perform extra checks (when --enable-checking is used) */ #ifndef NDEBUG #define UDB_CHECK 1 #endif -#endif /** pointers are stored like this */ typedef uint64_t udb_void; @@ -144,7 +141,7 @@ struct udb_glob_d { uint64_t hsize; /** version number of this file */ uint8_t version; - /** was the file cleanly closed, 0 is not clean, 1 is clean */ + /** was the file not cleanly closed, 0 is ok */ uint8_t clean_close; /** an allocation operation was in progress, file needs to be salvaged * type enum udb_dirty_alloc */ @@ -204,11 +201,6 @@ struct udb_base { udb_walk_relptr_func* walkfunc; /** user data for walkfunc */ void* walkarg; - - /** compaction is inhibited */ - int inhibit_compact; - /** compaction is useful; deletions performed. */ - int useful_compact; }; typedef enum udb_chunk_type udb_chunk_type; @@ -554,22 +546,6 @@ udb_void udb_alloc_realloc(udb_alloc* alloc, udb_void r, size_t osz, */ int udb_alloc_grow(udb_alloc* alloc, size_t sz, size_t num); -/** - * attempt to compact the data and move free space to the end - * can shrink the db, which calls sync on the db (for portability). - * @param udb: the udb base. - * @return 0 on failure (to remap the (possibly) changed udb base). - */ -int udb_compact(udb_base* udb); - -/** - * set the udb to inhibit or uninhibit compaction. Does not perform - * the compaction itself if enabled, for that call udb_compact. - * @param udb: the udb base - * @param inhibit: 0 or 1. - */ -void udb_compact_inhibited(udb_base* udb, int inhibit); - /** * Set the alloc type for a newly alloced piece of data * @param alloc: the udb space allocator. |