mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel@redhat.com, linux-kernel@vger.kernel.org
Cc: Steven Whitehouse <swhiteho@redhat.com>, Nick Piggin <npiggin@gmail.com>
Subject: [PATCH 02/15] GFS2: Post-VFS scale update for RCU path walk
Date: Tue, 15 Mar 2011 09:11:32 +0000	[thread overview]
Message-ID: <1300180305-5993-3-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1300180305-5993-1-git-send-email-swhiteho@redhat.com>

We can allow a few more cases to use RCU path walking than
originally allowed. It should be possible to also enable
RCU path walking when the glock is already cached. Thats
a bit more complicated though, so left for a future patch.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Nick Piggin <npiggin@gmail.com>

diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
index 7118f1a..cbc0715 100644
--- a/fs/gfs2/acl.c
+++ b/fs/gfs2/acl.c
@@ -80,8 +80,11 @@ int gfs2_check_acl(struct inode *inode, int mask, unsigned int flags)
 	struct posix_acl *acl;
 	int error;
 
-	if (flags & IPERM_FLAG_RCU)
-		return -ECHILD;
+	if (flags & IPERM_FLAG_RCU) {
+		if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
+			return -ECHILD;
+		return -EAGAIN;
+	}
 
 	acl = gfs2_acl_get(GFS2_I(inode), ACL_TYPE_ACCESS);
 	if (IS_ERR(acl))
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index d8b26ac..09e436a 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -1026,9 +1026,9 @@ static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 
 /**
  * gfs2_permission -
- * @inode:
- * @mask:
- * @nd: passed from Linux VFS, ignored by us
+ * @inode: The inode
+ * @mask: The mask to be tested
+ * @flags: Indicates whether this is an RCU path walk or not
  *
  * This may be called from the VFS directly, or from within GFS2 with the
  * inode locked, so we look to see if the glock is already locked and only
@@ -1044,11 +1044,11 @@ int gfs2_permission(struct inode *inode, int mask, unsigned int flags)
 	int error;
 	int unlock = 0;
 
-	if (flags & IPERM_FLAG_RCU)
-		return -ECHILD;
 
 	ip = GFS2_I(inode);
 	if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
+		if (flags & IPERM_FLAG_RCU)
+			return -ECHILD;
 		error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
 		if (error)
 			return error;
-- 
1.7.4


  parent reply	other threads:[~2011-03-15  9:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15  9:11 GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2011-03-15  9:11 ` [PATCH 01/15] GFS2: Use RCU for glock hash table Steven Whitehouse
2011-03-15  9:11 ` Steven Whitehouse [this message]
2011-03-15  9:11 ` [PATCH 03/15] GFS2: Fix glock queue trace point Steven Whitehouse
2011-03-15  9:11 ` [PATCH 04/15] GFS2: Improve cluster mmap scalability Steven Whitehouse
2011-03-15  9:11 ` [PATCH 05/15] GFS2: panics on quotacheck update Steven Whitehouse
2011-03-15  9:11 ` [PATCH 06/15] GFS2: deallocation performance patch Steven Whitehouse
2011-03-15  9:11 ` [PATCH 07/15] GFS2: quota allows exceeding hard limit Steven Whitehouse
2011-03-15  9:11 ` [PATCH 08/15] GFS2: Fix glock deallocation race Steven Whitehouse
2011-03-15  9:11 ` [PATCH 09/15] GFS2: Remove potential race in flock code Steven Whitehouse
2011-03-15  9:11 ` [PATCH 10/15] GFS2: Optimize glock multiple-dequeue code Steven Whitehouse
2011-03-15  9:11 ` [PATCH 11/15] GFS2: fix block allocation check for fallocate Steven Whitehouse
2011-03-15  9:11 ` [PATCH 12/15] GFS2: introduce AIL lock Steven Whitehouse
2011-03-15  9:11 ` [PATCH 13/15] GFS2: Update to AIL list locking Steven Whitehouse
2011-03-15  9:11 ` [PATCH 14/15] GFS2: Adding missing unlock_page() Steven Whitehouse
2011-03-15  9:11 ` [PATCH 15/15] GFS2: Don't use _raw version of RCU dereference Steven Whitehouse

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=1300180305-5993-3-git-send-email-swhiteho@redhat.com \
    --to=swhiteho@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®