mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:34:14 +08:00
mdbx: упрощение default_prefault_write()
.
This commit is contained in:
parent
7ffea70087
commit
48bd3fc4c8
@ -5963,11 +5963,8 @@ __cold static unsigned default_rp_augment_limit(const MDBX_env *env) {
|
||||
}
|
||||
|
||||
__cold static bool default_prefault_write(const MDBX_env *env) {
|
||||
if (env->me_incore ||
|
||||
(env->me_flags & (MDBX_WRITEMAP | MDBX_RDONLY)) != MDBX_WRITEMAP)
|
||||
return false;
|
||||
|
||||
return !MDBX_MMAP_INCOHERENT_FILE_WRITE;
|
||||
return !MDBX_MMAP_INCOHERENT_FILE_WRITE && !env->me_incore &&
|
||||
(env->me_flags & (MDBX_WRITEMAP | MDBX_RDONLY)) == MDBX_WRITEMAP;
|
||||
}
|
||||
|
||||
static void adjust_defaults(MDBX_env *env) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user