The rbac work introduced a regression that makes lustre_disk.h
UAPI header no longer buildable in user land. This is causing
sanity test 400b to fail with:
lustre_disk.h:266:18: error: 'LUSTRE_NODEMAP_NAME_LENGTH' undeclared here (not in a function)
char ncr_name[LUSTRE_NODEMAP_NAME_LENGTH + 1];
^~~~~~~~~~~~~~~~~~~~~~~~~~
lustre_disk.h:267:20: error: 'ncr_flags' is narrower than values of its type [-Werror]
enum nm_flag_bits ncr_flags:8;
^~~~~~~~~
lustre_disk.h:267:20: error: field 'ncr_flags' has incomplete type
lustre_disk.h:268:21: error: 'ncr_flags2' is narrower than values of its type [-Werror]
enum nm_flag2_bits ncr_flags2:8;
^~~~~~~~~~
lustre_disk.h:268:21: error: field 'ncr_flags2' has incomplete type
lustre_disk.h:277:2: error: unknown type name 'lnet_nid_t'
lnet_nid_t nrr_start_nid;
^~~~~~~~~~
lustre/lustre_disk.h:278:2: error: unknown type name 'lnet_nid_t'
lnet_nid_t nrr_end_nid;
^~~~~~~~~~
To fix this move several pieces of nodemap handling from lustre_idl.h
to lustre_disk.h.
The git commit
5e6a51787fef20b849682d8c49ec9c2beed5c373 for Linux
kernel version 6.2.0-rc5 made guid_t only available for kernel code.
The only UAPI data structure left is uuid_le. Thankfully MCE requires
this otherwise even uuid_le would be removed. We will need to keep
an eye on this.
Test-Parameters: trivial testlist=sanity envdefinitions=ONLY=400b
Fixes:
5e48ffca322 ("LU-16524 nodemap: add rbac property to nodemap")
Change-Id: I4b962572ec2bf76159a17807c564390ded00d630
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50641
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#ifndef _LUSTRE_NODEMAP_H
#define _LUSTRE_NODEMAP_H
-#include <uapi/linux/lustre/lustre_idl.h>
+#include <uapi/linux/lustre/lustre_disk.h>
#define LUSTRE_NODEMAP_NAME "nodemap"
*/
#include <linux/types.h>
#include <linux/uuid.h>
+#include <linux/lnet/lnet-types.h> /* for lnet_nid_t */
/****************** on-disk files ********************/
NODEMAP_GLOBAL_IDX = 15, /* stores nodemap activation status */
};
+#define LUSTRE_NODEMAP_NAME_LENGTH 16
+
+/* lu_nodemap flags */
+enum nm_flag_bits {
+ NM_FL_ALLOW_ROOT_ACCESS = 0x1,
+ NM_FL_TRUST_CLIENT_IDS = 0x2,
+ NM_FL_DENY_UNKNOWN = 0x4,
+ NM_FL_MAP_UID = 0x8,
+ NM_FL_MAP_GID = 0x10,
+ NM_FL_ENABLE_AUDIT = 0x20,
+ NM_FL_FORBID_ENCRYPT = 0x40,
+ NM_FL_MAP_PROJID = 0x80,
+};
+
+enum nm_flag2_bits {
+ NM_FL2_READONLY_MOUNT = 0x1,
+};
+
/* Nodemap records, uses 32 byte record length.
* New nodemap config records can be added into NODEMAP_CLUSTER_IDX
* with a new nk_cluster_subid value, as long as the records are
};
struct scrub_file {
- guid_t sf_uuid; /* 128-bit uuid for volume */
+ uuid_le sf_uuid; /* 128-bit uuid for volume */
__u64 sf_flags; /* see 'enum scrub_flags' */
__u32 sf_magic; /* SCRUB_MAGIC_V1/V2 */
__u16 sf_status; /* see 'enum scrub_status' */
SELINUX_POLICY_VER_LEN + \
SELINUX_POLICY_HASH_LEN + 3)
-#define LUSTRE_NODEMAP_NAME_LENGTH 16
-
-/* lu_nodemap flags */
-enum nm_flag_bits {
- NM_FL_ALLOW_ROOT_ACCESS = 0x1,
- NM_FL_TRUST_CLIENT_IDS = 0x2,
- NM_FL_DENY_UNKNOWN = 0x4,
- NM_FL_MAP_UID = 0x8,
- NM_FL_MAP_GID = 0x10,
- NM_FL_ENABLE_AUDIT = 0x20,
- NM_FL_FORBID_ENCRYPT = 0x40,
- NM_FL_MAP_PROJID = 0x80,
-};
-enum nm_flag2_bits {
- NM_FL2_READONLY_MOUNT = 0x1,
-};
-
/** enums containing the types of ids contained in a nodemap
* kept so other modules (mgs, mdt, etc) can define the type
* of search easily
#include <linux/types.h>
#include <uapi/linux/lnet/lnet-types.h>
#include <uapi/linux/lustre/lustre_idl.h>
+#include <uapi/linux/lustre/lustre_disk.h>
#include <dt_object.h>
#include <lu_object.h>
#include <lustre_net.h>
#include <keyutils.h>
#endif
#include <linux/lustre/lustre_idl.h>
+#include <linux/lustre/lustre_disk.h>
#include <openssl/dh.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>