From 7f6adc5f383677259e036e8325e1e3bdfa9e61cc Mon Sep 17 00:00:00 2001
From: deen <deen>
Date: Wed, 13 Feb 2008 19:03:27 +0000
Subject: [PATCH] ACLs must be enabled on MDS by default.

b=13829
i=adilger
i=johann
---
 lustre/ChangeLog         |  5 +++++
 lustre/mdt/mdt_handler.c | 19 +++++++++----------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 7bae329436..0e2d9b13e5 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -674,6 +674,11 @@ Details    : A lot of unlink operations with concurrent I/O can lead to a
 	     max_rpcs_in_flight per OSC and LDLM_FL_DISCARD_DATA blocking
 	     callbacks are processed in priority.
 
+Severity   : normal
+Bugzilla   : 13829
+Description: enable ACLs on MDS by default
+Details    : ACLs must be enabled on MDS by default.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c
index 34620b8108..331f970fb4 100644
--- a/lustre/mdt/mdt_handler.c
+++ b/lustre/mdt/mdt_handler.c
@@ -3713,6 +3713,15 @@ static void fsoptions_to_mdt_flags(struct mdt_device *m, char *options)
 {
         char *p = options;
 
+#ifdef CONFIG_FS_POSIX_ACL
+        /* ACLs should be enabled by default (b=13829) */
+        m->mdt_opts.mo_acl = 1;
+        LCONSOLE_INFO("Enabling ACL\n");
+#else
+        m->mdt_opts.mo_acl = 0;
+        LCONSOLE_INFO("Disabling ACL\n");
+#endif
+
         if (!options)
                 return;
 
@@ -3731,16 +3740,6 @@ static void fsoptions_to_mdt_flags(struct mdt_device *m, char *options)
                            (memcmp(options, "nouser_xattr", len) == 0)) {
                         m->mdt_opts.mo_user_xattr = 0;
                         LCONSOLE_INFO("Disabling user_xattr\n");
-                } else if ((len == sizeof("acl") - 1) &&
-                           (memcmp(options, "acl", len) == 0)) {
-#ifdef CONFIG_FS_POSIX_ACL
-                        m->mdt_opts.mo_acl = 1;
-                        LCONSOLE_INFO("Enabling ACL\n");
-#else
-                        m->mdt_opts.mo_acl = 0;
-                        CWARN("ignoring unsupported acl mount option\n");
-                        LCONSOLE_INFO("Disabling ACL\n");
-#endif
                 } else if ((len == sizeof("noacl") - 1) &&
                            (memcmp(options, "noacl", len) == 0)) {
                         m->mdt_opts.mo_acl = 0;
-- 
GitLab