ntdb: don't munmap the database on every close.
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)
commit66d151d6893657b31c419d422bffeefc506e2319
tree34d217715da0890571eda70fcfc67455ef1660d4
parent406bd2d121c3eeef7c3bb6bc74c7a6ccbe296c38
ntdb: don't munmap the database on every close.

Since we can have multiple openers, we should leave the mmap in place
for the other openers to use.  Enhance the test to check the bug (it
still works, because without mmap we fall back to read/write, but
performance would be terrible!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/ntdb/open.c
lib/ntdb/test/api-open-multiple-times.c