diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-22 09:44:40 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-22 07:35:17 +0200 |
commit | 0a34f342c3facace0767ff08f05532c9f161e305 (patch) | |
tree | c227f755f1933e797ac49f74a856c8d60b11539d /lib/ntdb/free.c | |
parent | 66d151d6893657b31c419d422bffeefc506e2319 (diff) | |
download | samba-0a34f342c3facace0767ff08f05532c9f161e305.tar.gz samba-0a34f342c3facace0767ff08f05532c9f161e305.tar.bz2 samba-0a34f342c3facace0767ff08f05532c9f161e305.zip |
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>
Diffstat (limited to 'lib/ntdb/free.c')
-rw-r--r-- | lib/ntdb/free.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/ntdb/free.c b/lib/ntdb/free.c index 971436f5a3..470c3765d9 100644 --- a/lib/ntdb/free.c +++ b/lib/ntdb/free.c @@ -958,9 +958,6 @@ ntdb_off_t alloc(struct ntdb_context *ntdb, size_t keylen, size_t datalen, { ntdb_off_t off; - /* We can't hold pointers during this: we could unmap! */ - assert(!ntdb->direct_access); - for (;;) { enum NTDB_ERROR ecode; off = get_free(ntdb, keylen, datalen, growing, magic); |