Whamcloud - gitweb
LU-8585 llite: add special fid handling for fhandle API
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_cfg.h
index 93884d7..760b1f9 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef _UAPI_LUSTRE_CFG_H
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
-/*
- * This is due to us being out of kernel and the way the OpenSFS branch
- * handles CFLAGS.
- */
-#ifdef __KERNEL__
-# include <uapi/linux/lustre/lustre_user.h>
-#else
-# include <linux/lustre/lustre_user.h>
-#endif
-
-/* Handle older distros */
-#ifndef __ALIGN_KERNEL
-# define __ALIGN_KERNEL(x, a)          __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
-# define __ALIGN_KERNEL_MASK(x, mask)  (((x) + (mask)) & ~(mask))
-#endif
+#include <linux/lustre/lustre_user.h>
 
 /** \defgroup cfg cfg
  *
@@ -133,6 +118,8 @@ enum lcfg_command_type {
                                                 *  id mapping
                                                 */
        LCFG_NODEMAP_ADMIN        = 0x00ce049, /**< allow cluster to use id 0 */
+       LCFG_NODEMAP_ADD_PROJIDMAP        = 0x00ce04a, /**< add a projidmap */
+       LCFG_NODEMAP_DEL_PROJIDMAP        = 0x00ce04b, /**< delete a projidmap */
        LCFG_NODEMAP_TRUSTED      = 0x00ce050, /**< trust a clusters ids */
        LCFG_NODEMAP_SQUASH_UID   = 0x00ce051, /**< default map uid */
        LCFG_NODEMAP_SQUASH_GID   = 0x00ce052, /**< default map gid */
@@ -151,6 +138,10 @@ enum lcfg_command_type {
        LCFG_NODEMAP_MAP_MODE     = 0x00ce059, /**< set the mapping mode */
        LCFG_NODEMAP_AUDIT_MODE   = 0x00ce05a, /**< set the audit mode */
        LCFG_NODEMAP_SET_SEPOL    = 0x00ce05b, /**< set SELinux policy */
+       LCFG_NODEMAP_FORBID_ENCRYPT     = 0x00ce05c, /**< forbid encryption */
+       LCFG_NODEMAP_SQUASH_PROJID      = 0x00ce05d, /**< default map projid */
+       LCFG_NODEMAP_READONLY_MOUNT     = 0x00ce05e, /**< read-only mount */
+       LCFG_NODEMAP_RBAC         = 0x00ce05f, /**< rbac */
 };
 
 struct lustre_cfg_bufs {
@@ -183,7 +174,7 @@ static struct lcfg_type_data lcfg_data_table[] = {
        { LCFG_DETACH, "detach", { "1", "2", "3", "4" } },
        { LCFG_SETUP, "setup", { "UUID", "node", "options", "failout" } },
        { LCFG_CLEANUP, "cleanup", { "1", "2", "3", "4" } },
-       { LCFG_ADD_UUID, "add_uuid", { "node", "2", "3", "4" }  },
+       { LCFG_ADD_UUID, "add_uuid", { "node", "nid", "3", "4" }  },
        { LCFG_DEL_UUID, "del_uuid", { "1", "2", "3", "4" }  },
        { LCFG_MOUNTOPT, "new_profile", { "name", "lov", "lmv", "4" }  },
        { LCFG_DEL_MOUNTOPT, "del_mountopt", { "1", "2", "3", "4" }  },
@@ -264,7 +255,7 @@ static inline void lustre_cfg_bufs_reset(struct lustre_cfg_bufs *bufs,
 static inline void *lustre_cfg_buf(struct lustre_cfg *lcfg, __u32 index)
 {
        __u32 i;
-       size_t offset;
+       __kernel_size_t offset;
        __u32 bufcount;
 
        if (!lcfg)
@@ -324,7 +315,7 @@ static inline void lustre_cfg_init(struct lustre_cfg *lcfg, int cmd,
        }
 }
 
-static inline int lustre_cfg_sanity_check(void *buf, size_t len)
+static inline int lustre_cfg_sanity_check(void *buf, __kernel_size_t len)
 {
        struct lustre_cfg *lcfg = (struct lustre_cfg *)buf;