Neil Brown writes:
> On Tuesday September 26, [EMAIL PROTECTED] wrote:
> > --- linux-2.3.99-pre3/fs/nfsd/nfsfh.c.orig Thu Aug 3 16:34:44 2000
> > +++ linux-2.3.99-pre3/fs/nfsd/nfsfh.c Thu Aug 3 16:36:42 2000
> > @@ -631,6 +631,13 @@
> >
> > inode = dentry->d_inode;
> >
> > + /* Before using this, we must revalidate with the filesystem. */
> > + if (inode->i_op && inode->i_op->revalidate) {
> > + error = inode->i_op->revalidate(dentry);
> > + if (error)
> > + goto out;
> > + }
> > +
> > /* Type check. The correct error return for type mismatches
> > * does not seem to be generally agreed upon. SunOS seems to
> > * use EISDIR if file isn't S_IFREG; a comment in the NFSv3
>
> NFS does all accesses using a filehandle, which is essentially a
> pointer to an inode. By the time you get the the bit of code where
> you have inserted a patch, it is the inode that we are really sure of,
> and the dentry is just there as a handle to hold the inode, because
> Linux/VFS perfers dentrys to inodes. At this point, revalidating the
> dentry seems a bit pointless.
It's not so much that you are revalidating the dentry itself, it's
rather that you are checking with the filesystem to see if any of
the data in the inode has been changed. Since it is possible that
the inode was changed on/by another host (if the filesystem is not
a local filesystem) we need to update the local inode before we send
out again information about it.
> What particular non-local filesystem are you trying to access via NFS?
It actually could be any number of distributed filesystems - InterMezzo,
GFS, etc, maybe its even a local filesystem that has HFS support and
you need to revalidate to ensure the file is still in on-line storage.
The point is that NFS needs to check with the filesystem first (if needed).
That's why i_op->revalidate exists (and is optional) in the first place.
> And re-exporting NFS is explicitly a no-no (though I cannot remember
> where I read that).
Actually, I seem to recall that there exist NFS->NFS repeaters already
(probably on Solaris). The reason for NFS exporting a cluster filesystem
are many - NFS clients are available for lots of platforms, some cluster
filesystems only work well tightly coupled, you want an HA NFS server,
you want an incrementally scalable NFS server, or some combination of these.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]