ntdb: enhancement to allow direct access to the ntdb map during expansion.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 22 Jun 2012 00:14:40 +0000 (09:44 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 22 Jun 2012 05:35:17 +0000 (07:35 +0200)
commit0a34f342c3facace0767ff08f05532c9f161e305
treec227f755f1933e797ac49f74a856c8d60b11539d
parent66d151d6893657b31c419d422bffeefc506e2319
ntdb: enhancement to allow direct access to the ntdb map during expansion.

This means keeping the old mmap around when we expand the database.
We could revert to read/write, except for platforms with incoherent
mmap (ie. OpenBSD), where we need to use mmap for all accesses.

Thus we keep a linked list of old maps, and unmap them when the last access
finally goes away.

This is required if we want ntdb_parse_record() callbacks to be able
to expand the database.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/ntdb/free.c
lib/ntdb/io.c
lib/ntdb/ntdb.c
lib/ntdb/open.c
lib/ntdb/private.h