mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-12 15:10:31 +08:00
More for rawpart
It was ignoring the mapsize recorded in the meta page, and was redundantly mapping the meta pages.
This commit is contained in:
parent
b6c4293f6f
commit
71fe835056
@ -5373,6 +5373,14 @@ mdb_env_open2(MDB_env *env, int prev)
|
||||
#endif
|
||||
;
|
||||
|
||||
/* if RAWPART, we did a preliminary mapping in read_header. drop it now. */
|
||||
if (flags & MDB_RAWPART) {
|
||||
munmap(env->me_map, env->me_mapsize);
|
||||
env->me_map = NULL;
|
||||
/* if mapsize was defaulted, use mapsize from metapage */
|
||||
if (env->me_mapsize == DEFAULT_MAPSIZE)
|
||||
env->me_mapsize = 0;
|
||||
}
|
||||
/* Was a mapsize configured? */
|
||||
if (!env->me_mapsize) {
|
||||
env->me_mapsize = meta.mm_mapsize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user