Messages in this thread | | | Date | Wed, 17 Feb 1999 12:56:46 -0800 (PST) | From | Jeremy Fitzhardinge <> | Subject | Re: fsync on large files |
| |
On 17-Feb-99 Linus Torvalds wrote: > > > On Wed, 17 Feb 1999, Alexander Viro wrote: >> > >> > Umm.. We _never_ use "." and ".." in filesystems. Never. >> >> Linus, please take a look at knfsd. > > Are you talking about
No, this stuff: nfsd/nfsfh.c /* * Read a directory and return the parent inode number and the name * of the specified entry. The dirent must be initialized with the * inode number of the desired entry. */ static int get_parent_ino(struct dentry *dentry, struct nfsd_dirent *dirent) { ...
This is because NFS file handles are a (dentry ptr, dir ino, ino) tuple. If the dentry ptr becomes invalid (server crashed, it was flushed, etc), then it needs to reconstruct a new dentry by traversing .. up to /. The basic problem is that not all dentry references are within the kernel's address space.
Of course the existing code makes the completely bogus assumption that '..' is always the second dir entry returned by readdir...
J
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |