Commit 2eef8a31 authored by Trond Myklebust's avatar Trond Myklebust

NFS: Trace lookup revalidation failure

Enable tracing of lookup revalidation failures.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 1a93b82c
...@@ -1474,9 +1474,7 @@ nfs_lookup_revalidate_done(struct inode *dir, struct dentry *dentry, ...@@ -1474,9 +1474,7 @@ nfs_lookup_revalidate_done(struct inode *dir, struct dentry *dentry,
{ {
switch (error) { switch (error) {
case 1: case 1:
dfprintk(LOOKUPCACHE, "NFS: %s(%pd2) is valid\n", break;
__func__, dentry);
return 1;
case 0: case 0:
/* /*
* We can't d_drop the root of a disconnected tree: * We can't d_drop the root of a disconnected tree:
...@@ -1485,13 +1483,10 @@ nfs_lookup_revalidate_done(struct inode *dir, struct dentry *dentry, ...@@ -1485,13 +1483,10 @@ nfs_lookup_revalidate_done(struct inode *dir, struct dentry *dentry,
* inodes on unmount and further oopses. * inodes on unmount and further oopses.
*/ */
if (inode && IS_ROOT(dentry)) if (inode && IS_ROOT(dentry))
return 1; error = 1;
dfprintk(LOOKUPCACHE, "NFS: %s(%pd2) is invalid\n", break;
__func__, dentry);
return 0;
} }
dfprintk(LOOKUPCACHE, "NFS: %s(%pd2) lookup returned error %d\n", trace_nfs_lookup_revalidate_exit(dir, dentry, 0, error);
__func__, dentry, error);
return error; return error;
} }
...@@ -1623,9 +1618,7 @@ nfs_do_lookup_revalidate(struct inode *dir, struct dentry *dentry, ...@@ -1623,9 +1618,7 @@ nfs_do_lookup_revalidate(struct inode *dir, struct dentry *dentry,
goto out_bad; goto out_bad;
trace_nfs_lookup_revalidate_enter(dir, dentry, flags); trace_nfs_lookup_revalidate_enter(dir, dentry, flags);
error = nfs_lookup_revalidate_dentry(dir, dentry, inode); return nfs_lookup_revalidate_dentry(dir, dentry, inode);
trace_nfs_lookup_revalidate_exit(dir, dentry, flags, error);
return error;
out_valid: out_valid:
return nfs_lookup_revalidate_done(dir, dentry, inode, 1); return nfs_lookup_revalidate_done(dir, dentry, inode, 1);
out_bad: out_bad:
......
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