Whamcloud - gitweb
LU-6142 lustre: introduce CONFIG_LUSTRE_FS_POSIX_ACL 85/36085/5
authorNeilBrown <neilb@suse.com>
Mon, 9 Sep 2019 16:45:51 +0000 (12:45 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Sep 2019 07:54:08 +0000 (07:54 +0000)
Lustre (or any file system) should not conditionally
compile code based on CONFIG_FS_POSIX_ACL.  This config
option enables library support.
A file system can define it's own config option,
which then selects CONFIG_FS_POSIX_ACL (if needed).  It should
act on its own option, not the library one.

This patch makes that change.

While lustre is out-of-tree, it cannot select CONFIG_FS_POSIX_ACL
and must work with the configruation of the kernel it is being built
against. So the new CONFIG_LUSTRE_FS_POSIX_ACL can only be selected
if the based kernel has CONFIG_FS_POSIX_ACL selected. With that
restriction this change becomes little more than an indirection.
However it means that the out-of-tree code can be closer to the
(eventual) in-tree code.

Test-Parameters: trivial

Signed-off-by: NeilBrown <neilb@suse.com>
Change-Id: I3ba283f295d1c7217e7ff9917573be0fe92bb2ca
Reviewed-on: https://review.whamcloud.com/36085
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 files changed:
libcfs/include/libcfs/linux/linux-fs.h
lustre/autoconf/lustre-core.m4
lustre/include/lustre_acl.h
lustre/include/lustre_compat.h
lustre/include/lustre_eacl.h
lustre/include/lustre_mdc.h
lustre/include/obd.h
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/xattr.c
lustre/mdc/mdc_request.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_object.c
lustre/mdd/mdd_permission.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_open.c
lustre/obdclass/acl.c
lustre/obdecho/echo_client.c
lustre/ptlrpc/wirehdr.c
lustre/ptlrpc/wiretest.c

index e7b6a5d..13c2e50 100644 (file)
@@ -41,7 +41,6 @@
 #include <linux/stat.h>
 #include <linux/mount.h>
 #include <linux/backing-dev.h>
 #include <linux/stat.h>
 #include <linux/mount.h>
 #include <linux/backing-dev.h>
-#include <linux/posix_acl_xattr.h>
 
 #ifndef HAVE_FILE_DENTRY
 static inline struct dentry *file_dentry(const struct file *file)
 
 #ifndef HAVE_FILE_DENTRY
 static inline struct dentry *file_dentry(const struct file *file)
@@ -61,17 +60,4 @@ static inline struct dentry *file_dentry(const struct file *file)
 #define DTTOIF(dirtype)                ((dirtype) << IFSHIFT)
 #endif
 
 #define DTTOIF(dirtype)                ((dirtype) << IFSHIFT)
 #endif
 
-#ifndef HAVE_POSIXACL_USER_NS
-/*
- * Mask out &init_user_ns so we don't jump
- * through hoops to define it somehow only
- * to have it ignored anyway.
- */
-#define posix_acl_from_xattr(a,b,c)    posix_acl_from_xattr(b,c)
-#define posix_acl_to_xattr(a,b,c,d)    posix_acl_to_xattr(b,c,d)
-#endif
-
-#ifndef HAVE_POSIX_ACL_VALID_USER_NS
-#define posix_acl_valid(a,b) posix_acl_valid(b)
-#endif
 #endif
 #endif
index 28e2b80..210ddaa 100644 (file)
@@ -181,6 +181,22 @@ Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.
 ])])
 ]) # LC_QUOTA_CONFIG
 
 ])])
 ]) # LC_QUOTA_CONFIG
 
+
+#[AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])])
+#
+# LC_POSIX_ACL_CONFIG
+#
+# POSIX ACL support.
+#
+AC_DEFUN([LC_POSIX_ACL_CONFIG], [
+LB_CHECK_CONFIG_IM([FS_POSIX_ACL],
+       [AC_DEFINE(CONFIG_LUSTRE_FS_POSIX_ACL, 1, [Enable POSIX acl])
+], [ ])
+]) # LC_POSIX_ACL_CONFIG
+
+LB_CHECK_CONFIG_IM([CRYPTO_MD5], [],
+               [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
+
 #
 # LC_CONFIG_GSS_KEYRING
 #
 #
 # LC_CONFIG_GSS_KEYRING
 #
@@ -3115,6 +3131,7 @@ AC_DEFUN([LC_PROG_LINUX], [
                LC_STACK_SIZE
                LC_QUOTA_CONFIG
        ])
                LC_STACK_SIZE
                LC_QUOTA_CONFIG
        ])
+       LC_POSIX_ACL_CONFIG
 ]) # LC_PROG_LINUX
 
 #
 ]) # LC_PROG_LINUX
 
 #
index 933d09a..487fb8e 100644 (file)
 
 #include <linux/fs.h>
 #include <linux/dcache.h>
 
 #include <linux/fs.h>
 #include <linux/dcache.h>
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 # include <linux/posix_acl_xattr.h>
 # define LUSTRE_POSIX_ACL_MAX_ENTRIES 32
 # define LUSTRE_POSIX_ACL_MAX_SIZE_OLD                                 \
        (sizeof(posix_acl_xattr_header) +                               \
         LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry))
 # include <linux/posix_acl_xattr.h>
 # define LUSTRE_POSIX_ACL_MAX_ENTRIES 32
 # define LUSTRE_POSIX_ACL_MAX_SIZE_OLD                                 \
        (sizeof(posix_acl_xattr_header) +                               \
         LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(posix_acl_xattr_entry))
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 
 #ifndef LUSTRE_POSIX_ACL_MAX_SIZE_OLD
 # define LUSTRE_POSIX_ACL_MAX_SIZE_OLD 0
 
 #ifndef LUSTRE_POSIX_ACL_MAX_SIZE_OLD
 # define LUSTRE_POSIX_ACL_MAX_SIZE_OLD 0
index b8cfb06..0c0b3ba 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/fs_struct.h>
 #include <linux/namei.h>
 #include <linux/pagemap.h>
 #include <linux/fs_struct.h>
 #include <linux/namei.h>
 #include <linux/pagemap.h>
+#include <linux/posix_acl_xattr.h>
 #include <linux/bio.h>
 #include <linux/xattr.h>
 #include <linux/workqueue.h>
 #include <linux/bio.h>
 #include <linux/xattr.h>
 #include <linux/workqueue.h>
@@ -422,8 +423,22 @@ __vfs_setxattr(struct dentry *dentry, struct inode *inode, const char *name,
 }
 #endif /* HAVE_VFS_SETXATTR */
 
 }
 #endif /* HAVE_VFS_SETXATTR */
 
+#ifndef HAVE_POSIXACL_USER_NS
+/*
+ * Mask out &init_user_ns so we don't jump
+ * through hoops to define it somehow only
+ * to have it ignored anyway.
+ */
+#define posix_acl_from_xattr(a, b, c)  posix_acl_from_xattr(b, c)
+#define posix_acl_to_xattr(a, b, c, d) posix_acl_to_xattr(b, c, d)
+#endif
+
+#ifndef HAVE_POSIX_ACL_VALID_USER_NS
+#define posix_acl_valid(a,b)           posix_acl_valid(b)
+#endif
+
 #ifdef HAVE_IOP_SET_ACL
 #ifdef HAVE_IOP_SET_ACL
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 #ifndef HAVE_POSIX_ACL_UPDATE_MODE
 static inline int posix_acl_update_mode(struct inode *inode, umode_t *mode_p,
                          struct posix_acl **acl)
 #ifndef HAVE_POSIX_ACL_UPDATE_MODE
 static inline int posix_acl_update_mode(struct inode *inode, umode_t *mode_p,
                          struct posix_acl **acl)
index 03b9adc..347a8dc 100644 (file)
@@ -44,9 +44,9 @@
  * @{
  */
 
  * @{
  */
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 # include <linux/fs.h>
 # include <linux/fs.h>
-# include <linux/posix_acl_xattr.h>
+# include <lustre_compat.h>
 
 typedef struct {
         __u16                   e_tag;
 
 typedef struct {
         __u16                   e_tag;
@@ -87,7 +87,7 @@ extern int lustre_posix_acl_create_masq(posix_acl_xattr_entry *entry,
 extern int lustre_posix_acl_equiv_mode(posix_acl_xattr_entry *entry, mode_t *mode_p,
                                       int count);
 #endif /* HAVE_SERVER_SUPPORT */
 extern int lustre_posix_acl_equiv_mode(posix_acl_xattr_entry *entry, mode_t *mode_p,
                                       int count);
 #endif /* HAVE_SERVER_SUPPORT */
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 
 /** @} eacl */
 
 
 /** @} eacl */
 
index ac7b0d5..8c76386 100644 (file)
@@ -46,9 +46,9 @@
 
 #include <linux/fs.h>
 #include <linux/dcache.h>
 
 #include <linux/fs.h>
 #include <linux/dcache.h>
-#ifdef CONFIG_FS_POSIX_ACL
-# include <linux/posix_acl_xattr.h>
-#endif /* CONFIG_FS_POSIX_ACL */
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
+# include <lustre_compat.h>
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 #include <lustre_handles.h>
 #include <lustre_intent.h>
 #include <libcfs/libcfs.h>
 #include <lustre_handles.h>
 #include <lustre_intent.h>
 #include <libcfs/libcfs.h>
index f4cd024..9cdf306 100644 (file)
@@ -1035,7 +1035,7 @@ struct lustre_md {
                struct lmv_foreign_md   *lfm;
        };
        struct lmv_stripe_md    *default_lmv;
                struct lmv_foreign_md   *lfm;
        };
        struct lmv_stripe_md    *default_lmv;
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        struct posix_acl        *posix_acl;
 #endif
 };
        struct posix_acl        *posix_acl;
 #endif
 };
index cd7d1f6..d288209 100644 (file)
@@ -4850,7 +4850,7 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type)
 }
 
 #ifdef HAVE_IOP_SET_ACL
 }
 
 #ifdef HAVE_IOP_SET_ACL
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 {
        struct ll_sb_info *sbi = ll_i2sbi(inode);
 int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 {
        struct ll_sb_info *sbi = ll_i2sbi(inode);
@@ -4906,7 +4906,7 @@ out:
                set_cached_acl(inode, type, acl);
        RETURN(rc);
 }
                set_cached_acl(inode, type, acl);
        RETURN(rc);
 }
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 #endif /* HAVE_IOP_SET_ACL */
 
 int ll_inode_permission(struct inode *inode, int mask)
 #endif /* HAVE_IOP_SET_ACL */
 
 int ll_inode_permission(struct inode *inode, int mask)
index 7e4ac79..f27043c 100644 (file)
@@ -916,11 +916,11 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat);
 int ll_getattr_dentry(struct dentry *de, struct kstat *stat);
 struct posix_acl *ll_get_acl(struct inode *inode, int type);
 #ifdef HAVE_IOP_SET_ACL
 int ll_getattr_dentry(struct dentry *de, struct kstat *stat);
 struct posix_acl *ll_get_acl(struct inode *inode, int type);
 #ifdef HAVE_IOP_SET_ACL
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type);
 int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type);
-#else  /* !CONFIG_FS_POSIX_ACL */
+#else  /* !CONFIG_LUSTRE_FS_POSIX_ACL */
 #define ll_set_acl NULL
 #define ll_set_acl NULL
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 
 #endif
 int ll_migrate(struct inode *parent, struct file *file,
 
 #endif
 int ll_migrate(struct inode *parent, struct file *file,
index b29d215..cda72aa 100644 (file)
@@ -263,7 +263,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
         if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
                 data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
 #endif
         if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
                 data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
 #endif
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        data->ocd_connect_flags |= OBD_CONNECT_ACL | OBD_CONNECT_UMASK |
                                   OBD_CONNECT_LARGE_ACL;
 #endif
        data->ocd_connect_flags |= OBD_CONNECT_ACL | OBD_CONNECT_UMASK |
                                   OBD_CONNECT_LARGE_ACL;
 #endif
@@ -598,7 +598,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
        ptlrpc_req_finished(request);
 
        if (IS_ERR(root)) {
        ptlrpc_req_finished(request);
 
        if (IS_ERR(root)) {
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
                if (lmd.posix_acl) {
                        posix_acl_release(lmd.posix_acl);
                        lmd.posix_acl = NULL;
                if (lmd.posix_acl) {
                        posix_acl_release(lmd.posix_acl);
                        lmd.posix_acl = NULL;
@@ -1619,7 +1619,7 @@ void ll_clear_inode(struct inode *inode)
 
        ll_xattr_cache_destroy(inode);
 
 
        ll_xattr_cache_destroy(inode);
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        forget_all_cached_acls(inode);
        if (lli->lli_posix_acl) {
                posix_acl_release(lli->lli_posix_acl);
        forget_all_cached_acls(inode);
        if (lli->lli_posix_acl) {
                posix_acl_release(lli->lli_posix_acl);
@@ -2067,7 +2067,7 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)
                        return rc;
        }
 
                        return rc;
        }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if (body->mbo_valid & OBD_MD_FLACL) {
                spin_lock(&lli->lli_lock);
                if (lli->lli_posix_acl)
        if (body->mbo_valid & OBD_MD_FLACL) {
                spin_lock(&lli->lli_lock);
                if (lli->lli_posix_acl)
@@ -2552,7 +2552,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
                                             sbi->ll_flags & LL_SBI_32BIT_API),
                                 &md);
                if (IS_ERR(*inode)) {
                                             sbi->ll_flags & LL_SBI_32BIT_API),
                                 &md);
                if (IS_ERR(*inode)) {
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
                         if (md.posix_acl) {
                                 posix_acl_release(md.posix_acl);
                                 md.posix_acl = NULL;
                         if (md.posix_acl) {
                                 posix_acl_release(md.posix_acl);
                                 md.posix_acl = NULL;
index 52ca216..50e98a1 100644 (file)
@@ -439,7 +439,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler,
        if (test_xattr_is_selinux_disabled(handler, name))
                RETURN(-EOPNOTSUPP);
 
        if (test_xattr_is_selinux_disabled(handler, name))
                RETURN(-EOPNOTSUPP);
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        /* posix acl is under protection of LOOKUP lock. when calling to this,
         * we just have path resolution to the target inode, so we have great
         * chance that cached ACL is uptodate.
        /* posix acl is under protection of LOOKUP lock. when calling to this,
         * we just have path resolution to the target inode, so we have great
         * chance that cached ACL is uptodate.
@@ -846,7 +846,7 @@ const struct xattr_handler *ll_xattr_handlers[] = {
        &ll_user_xattr_handler,
        &ll_trusted_xattr_handler,
        &ll_security_xattr_handler,
        &ll_user_xattr_handler,
        &ll_trusted_xattr_handler,
        &ll_security_xattr_handler,
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        &ll_acl_access_xattr_handler,
        &ll_acl_default_xattr_handler,
 #endif
        &ll_acl_access_xattr_handler,
        &ll_acl_default_xattr_handler,
 #endif
index 5480111..e08bf89 100644 (file)
@@ -501,7 +501,7 @@ out:
        return rc;
 }
 
        return rc;
 }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 static int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md)
 {
         struct req_capsule     *pill = &req->rq_pill;
 static int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md)
 {
         struct req_capsule     *pill = &req->rq_pill;
@@ -650,7 +650,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
                         rc = mdc_unpack_acl(req, md);
                         if (rc)
                                 GOTO(out, rc);
                         rc = mdc_unpack_acl(req, md);
                         if (rc)
                                 GOTO(out, rc);
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
                 } else {
                         md->posix_acl = NULL;
 #endif
                 } else {
                         md->posix_acl = NULL;
 #endif
@@ -660,7 +660,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
         EXIT;
 out:
         if (rc) {
         EXIT;
 out:
         if (rc) {
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
                 posix_acl_release(md->posix_acl);
 #endif
         }
                 posix_acl_release(md->posix_acl);
 #endif
         }
index 7e71f4c..a8e4b60 100644 (file)
@@ -2117,7 +2117,7 @@ static int mdd_declare_create_object(const struct lu_env *env,
        if (rc)
                GOTO(out, rc);
 
        if (rc)
                GOTO(out, rc);
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if (def_acl_buf && def_acl_buf->lb_len > 0 && S_ISDIR(attr->la_mode)) {
                /* if dir, then can inherit default ACl */
                rc = mdo_declare_xattr_set(env, c, def_acl_buf,
        if (def_acl_buf && def_acl_buf->lb_len > 0 && S_ISDIR(attr->la_mode)) {
                /* if dir, then can inherit default ACl */
                rc = mdo_declare_xattr_set(env, c, def_acl_buf,
@@ -2360,7 +2360,7 @@ static int mdd_create_object(const struct lu_env *env, struct mdd_object *pobj,
                        GOTO(err_destroy, rc);
        }
 
                        GOTO(err_destroy, rc);
        }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if (def_acl_buf != NULL && def_acl_buf->lb_len > 0 &&
            S_ISDIR(attr->la_mode)) {
                /* set default acl */
        if (def_acl_buf != NULL && def_acl_buf->lb_len > 0 &&
            S_ISDIR(attr->la_mode)) {
                /* set default acl */
index 364474c..22355ab 100644 (file)
@@ -605,7 +605,7 @@ int mdd_attr_set_internal(const struct lu_env *env, struct mdd_object *obj,
        ENTRY;
 
        rc = mdo_attr_set(env, obj, attr, handle);
        ENTRY;
 
        rc = mdo_attr_set(env, obj, attr, handle);
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if (!rc && (attr->la_valid & LA_MODE) && needacl)
                rc = mdd_acl_chmod(env, obj, attr->la_mode, handle);
 #endif
        if (!rc && (attr->la_valid & LA_MODE) && needacl)
                rc = mdd_acl_chmod(env, obj, attr->la_mode, handle);
 #endif
@@ -1069,7 +1069,7 @@ static int mdd_declare_attr_set(const struct lu_env *env,
         if (rc)
                 return rc;
 
         if (rc)
                 return rc;
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if (attr->la_valid & LA_MODE) {
                mdd_read_lock(env, obj, DT_TGT_CHILD);
                rc = mdo_xattr_get(env, obj, &LU_BUF_NULL,
        if (attr->la_valid & LA_MODE) {
                mdd_read_lock(env, obj, DT_TGT_CHILD);
                rc = mdo_xattr_get(env, obj, &LU_BUF_NULL,
index 5d00907..2b03de1 100644 (file)
@@ -45,7 +45,7 @@
 #include <lustre_idmap.h>
 #include "mdd_internal.h"
 
 #include <lustre_idmap.h>
 #include "mdd_internal.h"
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 
 /*
  * Hold write_lock for o.
 
 /*
  * Hold write_lock for o.
@@ -207,7 +207,7 @@ int __mdd_fix_mode_acl(const struct lu_env *env, struct lu_buf *buf,
 static int mdd_check_acl(const struct lu_env *env, struct mdd_object *obj,
                        const struct lu_attr *la, int mask)
 {
 static int mdd_check_acl(const struct lu_env *env, struct mdd_object *obj,
                        const struct lu_attr *la, int mask)
 {
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        struct lu_ucred  *uc  = lu_ucred_assert(env);
        posix_acl_xattr_header *head;
        posix_acl_xattr_entry *entry;
        struct lu_ucred  *uc  = lu_ucred_assert(env);
        posix_acl_xattr_header *head;
        posix_acl_xattr_entry *entry;
index f8cc796..520609c 100644 (file)
@@ -555,7 +555,7 @@ int mdt_pack_size2body(struct mdt_thread_info *info,
        RETURN(0);
 }
 
        RETURN(0);
 }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 /*
  * Pack ACL data into the reply. UIDs/GIDs are mapped and filtered by nodemap.
  *
 /*
  * Pack ACL data into the reply. UIDs/GIDs are mapped and filtered by nodemap.
  *
@@ -1117,7 +1117,7 @@ int mdt_attr_get_complex(struct mdt_thread_info *info,
                        GOTO(out, rc = rc2);
        }
 
                        GOTO(out, rc = rc2);
        }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if (need & MA_ACL_DEF && S_ISDIR(mode)) {
                buf->lb_buf = ma->ma_acl;
                buf->lb_len = ma->ma_acl_size;
        if (need & MA_ACL_DEF && S_ISDIR(mode)) {
                buf->lb_buf = ma->ma_acl;
                buf->lb_len = ma->ma_acl_size;
@@ -1351,7 +1351,7 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                       repbody->mbo_max_mdsize);
        }
 
                       repbody->mbo_max_mdsize);
        }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if ((exp_connect_flags(req->rq_export) & OBD_CONNECT_ACL) &&
                 (reqbody->mbo_valid & OBD_MD_FLACL)) {
                struct lu_nodemap *nodemap = nodemap_get_from_exp(exp);
        if ((exp_connect_flags(req->rq_export) & OBD_CONNECT_ACL) &&
                 (reqbody->mbo_valid & OBD_MD_FLACL)) {
                struct lu_nodemap *nodemap = nodemap_get_from_exp(exp);
index e81c671..c3900a9 100644 (file)
@@ -836,7 +836,7 @@ int mdt_close_unpack(struct mdt_thread_info *info);
 int mdt_reint_unpack(struct mdt_thread_info *info, __u32 op);
 void mdt_fix_lov_magic(struct mdt_thread_info *info, void *eadata);
 int mdt_reint_rec(struct mdt_thread_info *, struct mdt_lock_handle *);
 int mdt_reint_unpack(struct mdt_thread_info *info, __u32 op);
 void mdt_fix_lov_magic(struct mdt_thread_info *info, void *eadata);
 int mdt_reint_rec(struct mdt_thread_info *, struct mdt_lock_handle *);
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 int mdt_pack_acl2body(struct mdt_thread_info *info, struct mdt_body *repbody,
                      struct mdt_object *o, struct lu_nodemap *nodemap);
 #endif
 int mdt_pack_acl2body(struct mdt_thread_info *info, struct mdt_body *repbody,
                      struct mdt_object *o, struct lu_nodemap *nodemap);
 #endif
index d79cc19..624d4b1 100644 (file)
@@ -563,7 +563,7 @@ static int mdt_finish_open(struct mdt_thread_info *info,
                RETURN(-ENOENT);
        }
 
                RETURN(-ENOENT);
        }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if (exp_connect_flags(exp) & OBD_CONNECT_ACL) {
                struct lu_nodemap *nodemap = nodemap_get_from_exp(exp);
                if (IS_ERR(nodemap))
        if (exp_connect_flags(exp) & OBD_CONNECT_ACL) {
                struct lu_nodemap *nodemap = nodemap_get_from_exp(exp);
                if (IS_ERR(nodemap))
index 599946f..c62cb20 100644 (file)
@@ -46,7 +46,7 @@
 # include <md_object.h>
 #endif /* HAVE_SERVER_SUPPORT */
 
 # include <md_object.h>
 #endif /* HAVE_SERVER_SUPPORT */
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 
 static inline void lustre_posix_acl_le_to_cpu(posix_acl_xattr_entry *d,
                                              posix_acl_xattr_entry *s)
 
 static inline void lustre_posix_acl_le_to_cpu(posix_acl_xattr_entry *d,
                                              posix_acl_xattr_entry *s)
index 1743b51..ed6fd8c 100644 (file)
@@ -1537,7 +1537,7 @@ static int echo_attr_get_complex(const struct lu_env *env,
                }
        }
 
                }
        }
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        if ((ma->ma_need & MA_ACL_DEF) && S_ISDIR(mode)) {
                buf->lb_buf = ma->ma_acl;
                buf->lb_len = ma->ma_acl_size;
        if ((ma->ma_need & MA_ACL_DEF) && S_ISDIR(mode)) {
                buf->lb_buf = ma->ma_acl;
                buf->lb_len = ma->ma_acl_size;
index 7f9fb09..e24d835 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_RPC
 
 
 #define DEBUG_SUBSYSTEM S_RPC
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 # include <linux/fs.h>
 # include <linux/posix_acl_xattr.h>
 # include <linux/fs.h>
 # include <linux/posix_acl_xattr.h>
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 
 #include <obd_support.h>
 #include <obd_class.h>
 
 #include <obd_support.h>
 #include <obd_class.h>
index 87b1407..1d3f174 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_RPC
 
 
 #define DEBUG_SUBSYSTEM S_RPC
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
 # include <linux/fs.h>
 # include <linux/posix_acl_xattr.h>
 # include <linux/fs.h>
 # include <linux/posix_acl_xattr.h>
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 
 #include <obd_support.h>
 #include <obd_class.h>
 
 #include <obd_support.h>
 #include <obd_class.h>
@@ -4628,7 +4628,7 @@ void lustre_assert_wire_constants(void)
        CLASSERT(FIEMAP_EXTENT_NO_DIRECT == 0x40000000);
        CLASSERT(FIEMAP_EXTENT_NET == 0x80000000);
 
        CLASSERT(FIEMAP_EXTENT_NO_DIRECT == 0x40000000);
        CLASSERT(FIEMAP_EXTENT_NET == 0x80000000);
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        /* Checks for type posix_acl_xattr_entry */
        LASSERTF((int)sizeof(posix_acl_xattr_entry) == 8, "found %lld\n",
                 (long long)(int)sizeof(posix_acl_xattr_entry));
        /* Checks for type posix_acl_xattr_entry */
        LASSERTF((int)sizeof(posix_acl_xattr_entry) == 8, "found %lld\n",
                 (long long)(int)sizeof(posix_acl_xattr_entry));
@@ -4644,9 +4644,9 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(posix_acl_xattr_entry, e_id));
        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_id) == 4, "found %lld\n",
                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_id));
                 (long long)(int)offsetof(posix_acl_xattr_entry, e_id));
        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_id) == 4, "found %lld\n",
                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_id));
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 
 
-#ifdef CONFIG_FS_POSIX_ACL
+#ifdef CONFIG_LUSTRE_FS_POSIX_ACL
        /* Checks for type posix_acl_xattr_header */
        LASSERTF((int)sizeof(posix_acl_xattr_header) == 4, "found %lld\n",
                 (long long)(int)sizeof(posix_acl_xattr_header));
        /* Checks for type posix_acl_xattr_header */
        LASSERTF((int)sizeof(posix_acl_xattr_header) == 4, "found %lld\n",
                 (long long)(int)sizeof(posix_acl_xattr_header));
@@ -4660,7 +4660,7 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_entries) == 0, "found %lld\n",
                 (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_entries));
 #endif /* HAVE_STRUCT_POSIX_ACL_XATTR */
        LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_entries) == 0, "found %lld\n",
                 (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_entries));
 #endif /* HAVE_STRUCT_POSIX_ACL_XATTR */
-#endif /* CONFIG_FS_POSIX_ACL */
+#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
 
        /* Checks for struct link_ea_header */
        LASSERTF((int)sizeof(struct link_ea_header) == 24, "found %lld\n",
 
        /* Checks for struct link_ea_header */
        LASSERTF((int)sizeof(struct link_ea_header) == 24, "found %lld\n",