summaryrefslogtreecommitdiff
path: root/fs/orangefs/namei.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-06-09 16:32:38 -0400
committerMartin Brandenburg <martin@omnibond.com>2016-08-02 15:38:45 -0400
commit71680c18c8f22deafbaaf76d1c2d0eed2899a3d2 (patch)
tree19a4fae045bbbb083983bfdc0c76ad417db744df /fs/orangefs/namei.c
parent31b7c1ab4ed14d3aeb658e11a114860a64290fea (diff)
orangefs: Cache getattr results.
The userspace component attempts to do this, but this will prevent us from even needing to go into userspace to satisfy certain getattr requests. Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Diffstat (limited to 'fs/orangefs/namei.c')
-rw-r--r--fs/orangefs/namei.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
index b37f80bf0bec..dde6c36f5a69 100644
--- a/fs/orangefs/namei.c
+++ b/fs/orangefs/namei.c
@@ -73,6 +73,7 @@ static int orangefs_create(struct inode *dir,
d_instantiate(dentry, inode);
unlock_new_inode(inode);
dentry->d_time = jiffies + HZ;
+ ORANGEFS_I(inode)->getattr_time = 0;
gossip_debug(GOSSIP_NAME_DEBUG,
"%s: dentry instantiated for %s\n",
@@ -192,6 +193,8 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
goto out;
}
+ ORANGEFS_I(inode)->getattr_time = 0;
+
gossip_debug(GOSSIP_NAME_DEBUG,
"%s:%s:%d "
"Found good inode [%lu] with count [%d]\n",
@@ -320,6 +323,7 @@ static int orangefs_symlink(struct inode *dir,
d_instantiate(dentry, inode);
unlock_new_inode(inode);
dentry->d_time = jiffies + HZ;
+ ORANGEFS_I(inode)->getattr_time = 0;
gossip_debug(GOSSIP_NAME_DEBUG,
"Inode (Symlink) %pU -> %s\n",
@@ -383,6 +387,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
d_instantiate(dentry, inode);
unlock_new_inode(inode);
dentry->d_time = jiffies + HZ;
+ ORANGEFS_I(inode)->getattr_time = 0;
gossip_debug(GOSSIP_NAME_DEBUG,
"Inode (Directory) %pU -> %s\n",
@@ -413,6 +418,8 @@ static int orangefs_rename(struct inode *old_dir,
"orangefs_rename: called (%pd2 => %pd2) ct=%d\n",
old_dentry, new_dentry, d_count(new_dentry));
+ ORANGEFS_I(new_dentry->d_parent->d_inode)->getattr_time = 0;
+
new_op = op_alloc(ORANGEFS_VFS_OP_RENAME);
if (!new_op)
return -EINVAL;