From 0297136648a368fed6fd1e31f61071be4a562177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sun, 12 Jan 2025 02:32:12 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D1=83=D0=BB=D1=83=D1=87=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B0=D0=B2=D1=82=D0=BE-=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B2=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=20without-lck=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BE=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=91=D0=94=20=D0=BD=D0=B0=20read-only-=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D0=B8=D1=82=D0=B5=D0=BB=D0=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lck.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lck.c b/src/lck.c index 1c7c3811..3b8b4a6e 100644 --- a/src/lck.c +++ b/src/lck.c @@ -135,25 +135,22 @@ __cold int lck_setup(MDBX_env *env, mdbx_mode_t mode) { switch (err) { default: return err; - case MDBX_ENOFILE: case MDBX_EACCESS: case MDBX_EPERM: if (!F_ISSET(env->flags, MDBX_RDONLY | MDBX_EXCLUSIVE)) return err; break; + case MDBX_ENOFILE: case MDBX_EROFS: if ((env->flags & MDBX_RDONLY) == 0) return err; - break; - } - - if (err != MDBX_ENOFILE) { /* ENSURE the file system is read-only */ err = osal_check_fs_rdonly(env->lazy_fd, env->pathname.lck, err); if (err != MDBX_SUCCESS && /* ignore ERROR_NOT_SUPPORTED for exclusive mode */ !(err == MDBX_ENOSYS && (env->flags & MDBX_EXCLUSIVE))) return err; + break; } /* LY: without-lck mode (e.g. exclusive or on read-only filesystem) */