summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorHanna V. Linder <hannal@us.ibm.com>2002-04-24 01:24:02 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-04-24 01:24:02 -0700
commit898683e9fabbbc9c9e837551f996423853fb26ba (patch)
tree3ec2bab3ac1e23ff998f849d1f46955b6cee1763 /include/linux/fs.h
parentfe7885a4a5fdca56365343251b3007b67b77da86 (diff)
[PATCH] FastWalk Dcache
Reduce cacheline bouncing when a dentry is in the cache. Specifically, the d_count reference counter is not incremented and decremented for every dentry in a path during path walking if the dentry is in the dcache. Execcisve atomic inc/dec's are expensive on SMP systems due to the cachline bouncing.
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 72a40b3bbda4..a97a764dcc53 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1386,12 +1386,15 @@ extern ino_t find_inode_number(struct dentry *, struct qstr *);
* - require a directory
* - ending slashes ok even for nonexistent files
* - internal "there are more path compnents" flag
+ * - locked when lookup done with dcache_lock held
*/
#define LOOKUP_FOLLOW (1)
#define LOOKUP_DIRECTORY (2)
#define LOOKUP_CONTINUE (4)
#define LOOKUP_PARENT (16)
#define LOOKUP_NOALT (32)
+#define LOOKUP_LOCKED (64)
+
/*
* Type of the last component on LOOKUP_PARENT
*/
@@ -1421,14 +1424,8 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
extern int FASTCALL(__user_walk(const char *, unsigned, struct nameidata *));
extern int FASTCALL(path_init(const char *, unsigned, struct nameidata *));
extern int FASTCALL(path_walk(const char *, struct nameidata *));
+extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
-static inline int path_lookup(const char *path, unsigned flags, struct nameidata *nd)
-{
- int error = 0;
- if (path_init(path, flags, nd))
- error = path_walk(path, nd);
- return error;
-}
extern void path_release(struct nameidata *);
extern int follow_down(struct vfsmount **, struct dentry **);
extern int follow_up(struct vfsmount **, struct dentry **);