Whamcloud - gitweb
LU-17108 nodemap: make map_mode available for default nm 35/52535/2
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 11 Sep 2023 15:31:09 +0000 (17:31 +0200)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Nov 2023 02:06:28 +0000 (02:06 +0000)
The map_mode property lets control the way mapping is carried out. It
is already available on regular nodemaps, to decide whether uids, gids
and/or projids will be mapped.
On the default nodemap, where it is not possible to define mappings,
the map_mode property will be taken into account when trusted is 0 and
deny_unknown is 0. Unmapped IDs will be left unchanged.

Lustre-change: https://review.whamcloud.com/52336
Lustre-commit: d9df39505530c5f224427103290b60828c11e81c

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I16a2f5cfda11a8435b56a00f3e97bdc70741c156
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52535
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/nodemap_lproc.c

index 1cd3149..152af32 100644 (file)
@@ -819,49 +819,54 @@ static struct lprocfs_vars lprocfs_nodemap_vars[] = {
 };
 
 static struct lprocfs_vars lprocfs_default_nodemap_vars[] = {
-       {
-               .name           = "id",
-               .fops           = &nodemap_id_fops,
-       },
-       {
-               .name           = "trusted_nodemap",
-               .fops           = &nodemap_trusted_fops,
-       },
+       /* in alphabetical order */
        {
                .name           = "admin_nodemap",
                .fops           = &nodemap_admin_fops,
        },
        {
+               .name           = "audit_mode",
+               .fops           = &nodemap_audit_mode_fops,
+       },
+       {
                .name           = "deny_unknown",
                .fops           = &nodemap_deny_unknown_fops,
        },
        {
-               .name           = "squash_uid",
-               .fops           = &nodemap_squash_uid_fops,
+               .name           = "exports",
+               .fops           = &nodemap_exports_fops,
        },
        {
-               .name           = "squash_gid",
-               .fops           = &nodemap_squash_gid_fops,
+               .name           = "fileset",
+               .fops           = &nodemap_fileset_fops,
        },
        {
-               .name           = "squash_projid",
-               .fops           = &nodemap_squash_projid_fops,
+               .name           = "forbid_encryption",
+               .fops           = &nodemap_forbid_encryption_fops,
        },
        {
-               .name           = "fileset",
-               .fops           = &nodemap_fileset_fops,
+               .name           = "id",
+               .fops           = &nodemap_id_fops,
        },
        {
-               .name           = "exports",
-               .fops           = &nodemap_exports_fops,
+               .name           = "map_mode",
+               .fops           = &nodemap_map_mode_fops,
        },
        {
-               .name           = "audit_mode",
-               .fops           = &nodemap_audit_mode_fops,
+               .name           = "squash_gid",
+               .fops           = &nodemap_squash_gid_fops,
        },
        {
-               .name           = "forbid_encryption",
-               .fops           = &nodemap_forbid_encryption_fops,
+               .name           = "squash_projid",
+               .fops           = &nodemap_squash_projid_fops,
+       },
+       {
+               .name           = "squash_uid",
+               .fops           = &nodemap_squash_uid_fops,
+       },
+       {
+               .name           = "trusted_nodemap",
+               .fops           = &nodemap_trusted_fops,
        },
        {
                NULL