From: Anoop C S Date: Tue, 21 Oct 2025 08:53:50 +0000 (+0530) Subject: mgr/smb: Disable posix locking in share definition X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F65999%2Fhead;p=ceph.git mgr/smb: Disable posix locking in share definition 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 --- 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 aed5723e9c0..177acd0eb80 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 82a21253f7b..c6945b5039b 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 8e7fe3c76f2..f806f1ffcef 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: