All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guangliang Zhao <lucienchao@gmail.com>
To: ceph-devel@vger.kernel.org
Cc: sage@inktank.com
Subject: [PATCH 2/3] ceph: add acl, noacl options for cephfs mount
Date: Fri, 14 Feb 2014 13:29:43 +0800	[thread overview]
Message-ID: <1392355784-10422-3-git-send-email-lucienchao@gmail.com> (raw)
In-Reply-To: <1392355784-10422-1-git-send-email-lucienchao@gmail.com>

Signed-off-by: Guangliang Zhao <lucienchao@gmail.com>
---
 fs/ceph/super.c |   24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 2df963f..9d65c08 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -144,7 +144,9 @@ enum {
 	Opt_ino32,
 	Opt_noino32,
 	Opt_fscache,
-	Opt_nofscache
+	Opt_nofscache,
+	Opt_acl,
+	Opt_noacl
 };
 
 static match_table_t fsopt_tokens = {
@@ -172,6 +174,8 @@ static match_table_t fsopt_tokens = {
 	{Opt_noino32, "noino32"},
 	{Opt_fscache, "fsc"},
 	{Opt_nofscache, "nofsc"},
+	{Opt_acl, "acl"},
+	{Opt_noacl, "noacl"},
 	{-1, NULL}
 };
 
@@ -271,6 +275,12 @@ static int parse_fsopt_token(char *c, void *private)
 	case Opt_nofscache:
 		fsopt->flags &= ~CEPH_MOUNT_OPT_FSCACHE;
 		break;
+	case Opt_acl:
+		fsopt->sb_flags |= MS_POSIXACL;
+		break;
+	case Opt_noacl:
+		fsopt->sb_flags &= ~MS_POSIXACL;
+		break;
 	default:
 		BUG_ON(token);
 	}
@@ -438,6 +448,11 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
 	else
 		seq_puts(m, ",nofsc");
 
+	if (fsopt->sb_flags & MS_POSIXACL)
+		seq_puts(m, ",acl");
+	else
+		seq_puts(m, ",noacl");
+
 	if (fsopt->wsize)
 		seq_printf(m, ",wsize=%d", fsopt->wsize);
 	if (fsopt->rsize != CEPH_RSIZE_DEFAULT)
@@ -819,9 +834,6 @@ static int ceph_set_super(struct super_block *s, void *data)
 
 	s->s_flags = fsc->mount_options->sb_flags;
 	s->s_maxbytes = 1ULL << 40;  /* temp value until we get mdsmap */
-#ifdef CONFIG_CEPH_FS_POSIX_ACL
-	s->s_flags |= MS_POSIXACL;
-#endif
 
 	s->s_xattr = ceph_xattr_handlers;
 	s->s_fs_info = fsc;
@@ -911,6 +923,10 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type,
 	struct ceph_options *opt = NULL;
 
 	dout("ceph_mount\n");
+
+#ifdef CONFIG_CEPH_FS_POSIX_ACL
+       flags |= MS_POSIXACL;
+#endif
 	err = parse_mount_options(&fsopt, &opt, flags, data, dev_name, &path);
 	if (err < 0) {
 		res = ERR_PTR(err);
-- 
1.7.9.5


  parent reply	other threads:[~2014-02-14  5:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  5:29 [PATCH 0/3] several misc patches Guangliang Zhao
2014-02-14  5:29 ` [PATCH 1/3] ceph: make ceph_forget_all_cached_acls() static inline Guangliang Zhao
2014-02-14 12:29   ` Alex Elder
2014-02-16 18:27     ` Sage Weil
2014-02-14  5:29 ` Guangliang Zhao [this message]
2014-02-14 13:00   ` [PATCH 2/3] ceph: add acl, noacl options for cephfs mount Alex Elder
2014-02-16 18:26     ` Sage Weil
2014-02-17 14:27       ` Guangliang Zhao
2014-02-18  0:08       ` Alex Elder
2014-02-14  5:29 ` [PATCH 3/3] ceph: make ceph ACL for symlink inheritable Guangliang Zhao
2014-02-14 13:06   ` Alex Elder
2014-02-16 18:27     ` Sage Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392355784-10422-3-git-send-email-lucienchao@gmail.com \
    --to=lucienchao@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sage@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.