diff options
author | Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> | 2023-08-07 15:26:18 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2023-11-03 23:28:33 +0100 |
commit | 673478b6e59b25079a590eb5ba89d7a3ec9c1c78 (patch) | |
tree | f2f236bd9327849549d415c0842424ea25813a08 /fs/ceph/super.c | |
parent | ceph: handle idmapped mounts in create_request_message() (diff) | |
download | linux-673478b6e59b25079a590eb5ba89d7a3ec9c1c78.tar.xz linux-673478b6e59b25079a590eb5ba89d7a3ec9c1c78.zip |
ceph: add enable_unsafe_idmap module parameter
This parameter is used to decide if we allow
to perform IO on idmapped mount in case when MDS lacks
support of CEPHFS_FEATURE_HAS_OWNER_UIDGID feature.
In this case we can't properly handle MDS permission
checks and if UID/GID-based restrictions are enabled
on the MDS side then IO requests which go through an
idmapped mount may fail with -EACCESS/-EPERM.
Fortunately, for most of users it's not a case and
everything should work fine. But we put work "unsafe"
in the module parameter name to warn users about
possible problems with this feature and encourage
update of cephfs MDS.
Suggested-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Acked-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | fs/ceph/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 551fb686182b..33fedcafbab7 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -1681,6 +1681,11 @@ static const struct kernel_param_ops param_ops_mount_syntax = { module_param_cb(mount_syntax_v1, ¶m_ops_mount_syntax, &mount_support, 0444); module_param_cb(mount_syntax_v2, ¶m_ops_mount_syntax, &mount_support, 0444); +bool enable_unsafe_idmap = false; +module_param(enable_unsafe_idmap, bool, 0644); +MODULE_PARM_DESC(enable_unsafe_idmap, + "Allow to use idmapped mounts with MDS without CEPHFS_FEATURE_HAS_OWNER_UIDGID"); + module_init(init_ceph); module_exit(exit_ceph); |