* [Cluster-devel] GFS2: Post-VFS scale update for RCU path walk
@ 2011-01-14 15:58 Steven Whitehouse
[not found] ` <AANLkTi=nkHZQrx5ODoXaa-1deH1HvQ_QtkfvZx4diR3n@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Steven Whitehouse @ 2011-01-14 15:58 UTC (permalink / raw)
To: cluster-devel.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 1501db4..6b95a43 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -1030,9 +1030,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
@@ -1048,11 +1048,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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] GFS2: Post-VFS scale update for RCU path walk
[not found] ` <AANLkTi=nkHZQrx5ODoXaa-1deH1HvQ_QtkfvZx4diR3n@mail.gmail.com>
@ 2011-01-14 22:02 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2011-01-14 22:02 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Sat, 2011-01-15 at 08:54 +1100, Nick Piggin wrote:
> On Sat, Jan 15, 2011 at 2:58 AM, Steven Whitehouse <swhiteho@redhat.com> wrote:
> >
> > 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.
>
> Cool, thanks for taking a look. GFS2 also has a .d_revalidate, right? You'll
> want to permit rcu-walk for that guy as well in order for it all to work. Any
> chance of that?
Yes, I'll add that to the list as well, however it will probably require
the glock change I mentioned in the comment above to make it worth
doing. I'll certainly take a look though,
Steve.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-14 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 15:58 [Cluster-devel] GFS2: Post-VFS scale update for RCU path walk Steven Whitehouse
[not found] ` <AANLkTi=nkHZQrx5ODoXaa-1deH1HvQ_QtkfvZx4diR3n@mail.gmail.com>
2011-01-14 22:02 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).