Messages in this thread | | | Date | Tue, 4 May 1999 23:14:55 -0400 (EDT) | From | Alexander Viro <> | Subject | Re: ext2 warning in Linux 2.2.7 |
| |
On Tue, 4 May 1999, H.J. Lu wrote:
> > > > > > I've been modifying the kernel to do inter-file prefetching (part of > > my thesis research) and have gotten similar warnings on modified > > versions of 2.2.5 and 2.2.7. In fact I'm currently trying to debug > > what's causing these warnings to occur. > > > > Nevertheless, I have not gotten them in an unmodified kernel. > > > > The problem is knsfd 1.2.2a. It calls iget to find the inode and > then calls iput to release it. If the inode requested from the > client has been deleted on the server and iget happened to get > the deleted inode from the disk, iput on the deleted inode will > cause the prolem. One solutaion is to make a new function, > iget_in_use, which will only return the inode if it is in use. > I will make knsfd 1.3 soon to fix the bug.
;-/ I'm afraid that the whole scheme with calling iget() here is broken by design. You can get out with this kludge in case of ext2, but for NFS/NCPFS/SMBFS/CODA reexports, for anything FAT-derived, for ISOFS... Not going to work. And even in case of ext2/ufs/sysvfs/minix it's a kludge.
I've played with that place of knfsd last two weeks and I have to agree with Linus - iget() should be used only inside of UNIX-like filesystems and only for regular lookups. Maybe we should give up on using inumber here (we are using pair of inumbers anyway) and leave the decision re what is proper fhandle to filesystem drivers. That would mean adding dentry_to_fh and fh_to_dentry methods and dropping the corresponding code from knfsd. If filesystem doesn't implement them - though luck, stale dentry => stale fhandle. We can't do any better for ISOFS and friends anyway.
- 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/
| |