From: Sebastien Buisson Date: Mon, 11 Sep 2023 15:31:09 +0000 (+0200) Subject: LU-17108 nodemap: make map_mode available for default nm X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=613ca001049887b1dc0cb2501f566c263ff7a006;p=fs%2Flustre-release.git LU-17108 nodemap: make map_mode available for default nm 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. Signed-off-by: Sebastien Buisson Change-Id: I16a2f5cfda11a8435b56a00f3e97bdc70741c156 --- diff --git a/lustre/ptlrpc/nodemap_lproc.c b/lustre/ptlrpc/nodemap_lproc.c index 23d8534..824fa95 100644 --- a/lustre/ptlrpc/nodemap_lproc.c +++ b/lustre/ptlrpc/nodemap_lproc.c @@ -903,55 +903,60 @@ 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 = "deny_unknown", - .fops = &nodemap_deny_unknown_fops, - }, - { - .name = "squash_uid", - .fops = &nodemap_squash_uid_fops, + .name = "audit_mode", + .fops = &nodemap_audit_mode_fops, }, { - .name = "squash_gid", - .fops = &nodemap_squash_gid_fops, + .name = "deny_unknown", + .fops = &nodemap_deny_unknown_fops, }, { - .name = "squash_projid", - .fops = &nodemap_squash_projid_fops, + .name = "exports", + .fops = &nodemap_exports_fops, }, { .name = "fileset", .fops = &nodemap_fileset_fops, }, { - .name = "exports", - .fops = &nodemap_exports_fops, + .name = "forbid_encryption", + .fops = &nodemap_forbid_encryption_fops, }, { - .name = "audit_mode", - .fops = &nodemap_audit_mode_fops, + .name = "id", + .fops = &nodemap_id_fops, }, { - .name = "forbid_encryption", - .fops = &nodemap_forbid_encryption_fops, + .name = "map_mode", + .fops = &nodemap_map_mode_fops, }, { .name = "readonly_mount", .fops = &nodemap_readonly_mount_fops, }, { + .name = "squash_gid", + .fops = &nodemap_squash_gid_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 } };