diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-04-15 08:33:51 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-04-15 08:33:51 -0700 |
| commit | 0de4fa30014b4d6f46b0cddc3edda39803e020d3 (patch) | |
| tree | c59420aded8b73f347e3d5eb5d542c88736b236a /include | |
| parent | 2b2bf47eaa826e77d4deed40967b29a6fafcd475 (diff) | |
[PATCH] dcache changes for preparing for "export_operations" interface for nfsd to use.
Prepare for new export_operations interface (for filehandle lookup):
- define d_splice_alias and d_alloc_anon.
- define shrink_dcache_anon for removing anonymous dentries
- modify d_move to work with anonymous dentries (IS_ROOT dentries)
- modify d_find_alias to avoid anonymous dentries where possible
as d_splice_alias and d_alloc_anon use this
- put in place infrastructure for s_anon allocation and cleaning
- replace a piece of code that is in nfsfh, reiserfs and fat
with a call to d_alloc_anon
- Rename DCACHE_NFSD_DISCONNECTED to DCACHE_DISCONNECTED
- Add documentation at Documentation/filesystems/Exporting
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/dcache.h | 5 | ||||
| -rw-r--r-- | include/linux/fs.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 21da57231050..a98c3fe940c0 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -117,7 +117,7 @@ d_iput: no no yes * renamed" and has to be * deleted on the last dput() */ -#define DCACHE_NFSD_DISCONNECTED 0x0004 /* This dentry is not currently connected to the +#define DCACHE_DISCONNECTED 0x0004 /* This dentry is not currently connected to the * dcache tree. Its parent will either be itself, * or will have this flag as well. * If this dentry points to a directory, then @@ -166,8 +166,11 @@ extern void d_delete(struct dentry *); /* allocate/de-allocate */ extern struct dentry * d_alloc(struct dentry *, const struct qstr *); +extern struct dentry * d_alloc_anon(struct inode *); +extern struct dentry * d_splice_alias(struct inode *, struct dentry *); extern void shrink_dcache_sb(struct super_block *); extern void shrink_dcache_parent(struct dentry *); +extern void shrink_dcache_anon(struct list_head *); extern int d_invalidate(struct dentry *); #define shrink_dcache() prune_dcache(0) diff --git a/include/linux/fs.h b/include/linux/fs.h index 350fcc2111c4..17b3b586df2c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -711,6 +711,7 @@ struct super_block { struct list_head s_dirty; /* dirty inodes */ struct list_head s_locked_inodes;/* inodes being synced */ + struct list_head s_anon; /* anonymous dentries for (nfs) exporting */ struct list_head s_files; struct block_device *s_bdev; @@ -879,7 +880,7 @@ struct super_operations { * and must return a dentry for the referenced object or, if "parent" is * set, a dentry for the parent of the object. * If a dentry cannot be found, a "root" dentry should be created and - * flaged as DCACHE_NFSD_DISCONNECTED. nfsd_iget is an example implementation. + * flaged as DCACHE_DISCONNECTED. nfsd_iget is an example implementation. * * dentry_to_fh is given a dentry and must generate the filesys specific * part of the file handle. Available length is passed in *lenp and used |
