mdbx: упрощение default_prefault_write().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-12-28 16:25:04 +03:00
parent 7ffea70087
commit 48bd3fc4c8

View File

@ -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) { __cold static bool default_prefault_write(const MDBX_env *env) {
if (env->me_incore || return !MDBX_MMAP_INCOHERENT_FILE_WRITE && !env->me_incore &&
(env->me_flags & (MDBX_WRITEMAP | MDBX_RDONLY)) != MDBX_WRITEMAP) (env->me_flags & (MDBX_WRITEMAP | MDBX_RDONLY)) == MDBX_WRITEMAP;
return false;
return !MDBX_MMAP_INCOHERENT_FILE_WRITE;
} }
static void adjust_defaults(MDBX_env *env) { static void adjust_defaults(MDBX_env *env) {