From 05b125b2387736389e018c11a8219e07fabb4448 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Tue, 21 Oct 2025 14:23:50 +0530 Subject: [PATCH] mgr/smb: Disable posix locking in share definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The prerequisites for supporting durable handles[1] in Samba include disabling the mapping of POSIX locks, as well as setting the `kernel oplocks` and `kernel sharemodes` parameters to disabled. Currently this configuration is hard‑coded, but in the future it could be made conditional and combined with other settings to enable persistent handles on continuously available shares. [1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#DURABLEHANDLES Signed-off-by: Anoop C S --- qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml | 1 + qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml | 1 + src/pybind/mgr/smb/handler.py | 1 + 3 files changed, 3 insertions(+) diff --git a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml index aed5723e9c0e2..177acd0eb8093 100644 --- a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml +++ b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml @@ -60,6 +60,7 @@ tasks: "disable spoolss" = "yes" "guest ok" = "no" "smbd profiling level" = "on" + "posix locking" = "no" [globals.domain.options] security = "USER" workgroup = "STANDALONE1" diff --git a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml index 82a21253f7b4d..c6945b5039b15 100644 --- a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml +++ b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml @@ -59,6 +59,7 @@ tasks: "disable spoolss" = "yes" "guest ok" = "no" "smbd profiling level" = "on" + "posix locking" = "no" [globals.domain.options] security = "ads" workgroup = "DOMAIN1" diff --git a/src/pybind/mgr/smb/handler.py b/src/pybind/mgr/smb/handler.py index 8e7fe3c76f200..f806f1ffcef9e 100644 --- a/src/pybind/mgr/smb/handler.py +++ b/src/pybind/mgr/smb/handler.py @@ -721,6 +721,7 @@ def _generate_share( 'kernel share modes': 'no', 'x:ceph:id': f'{share.cluster_id}.{share.share_id}', 'smbd profiling share': 'yes', + 'posix locking': 'no', } } if share.comment is not None: -- 2.39.5