Commit 75d5cfbe authored by Steven Whitehouse's avatar Steven Whitehouse

GFS2: Post-VFS scale update for RCU path walk

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: default avatarSteven Whitehouse <swhiteho@redhat.com>
Cc: Nick Piggin <npiggin@gmail.com>
parent bc015cb8
...@@ -80,8 +80,11 @@ int gfs2_check_acl(struct inode *inode, int mask, unsigned int flags) ...@@ -80,8 +80,11 @@ int gfs2_check_acl(struct inode *inode, int mask, unsigned int flags)
struct posix_acl *acl; struct posix_acl *acl;
int error; int error;
if (flags & IPERM_FLAG_RCU) if (flags & IPERM_FLAG_RCU) {
return -ECHILD; if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
return -ECHILD;
return -EAGAIN;
}
acl = gfs2_acl_get(GFS2_I(inode), ACL_TYPE_ACCESS); acl = gfs2_acl_get(GFS2_I(inode), ACL_TYPE_ACCESS);
if (IS_ERR(acl)) if (IS_ERR(acl))
......
...@@ -1026,9 +1026,9 @@ static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p) ...@@ -1026,9 +1026,9 @@ static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
/** /**
* gfs2_permission - * gfs2_permission -
* @inode: * @inode: The inode
* @mask: * @mask: The mask to be tested
* @nd: passed from Linux VFS, ignored by us * @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 * 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 * 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) ...@@ -1044,11 +1044,11 @@ int gfs2_permission(struct inode *inode, int mask, unsigned int flags)
int error; int error;
int unlock = 0; int unlock = 0;
if (flags & IPERM_FLAG_RCU)
return -ECHILD;
ip = GFS2_I(inode); ip = GFS2_I(inode);
if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { 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); error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
if (error) if (error)
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment