[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [GFS2 Patch] pass formal ino in do_filldir_main


I gave this issue some more thoughts - would like to suggest we take this patch (at least for now) since it aligns with current code base.

The no_formal_ino is apparently intented to get returned back to user space due to its unique-ness (and we have to trust pick_formal_ino() does its job right). With normal readdir system call, after the inode number is sent to user space, there is no route (I've checked) for it to come back to kernel. So the only user that would use these filldir ino inside the kernel is NFSD. NFSD calls gfs2_ilookup() that requires no_formal_ino.

If you look further... The current lookup code actually uses no_formal_ino, not no_addr. The two main "gate" routines that controls ino-to-inode conversion are:

* gfs2_ilookup() (used by NFS route)
* gfs2_inode_lookup() (used by VFS that calls gfs2_lookup()).

Both use no_formal_ino - gfs2_inode_lookup() logic hides this behind the little wrapper "gfs2_iget()". Since current VFS side's lookup has been working fine, this no_formal_ino idea apparently is working. So let's make NFSD side work the *same* way. I'm convinced this patch does a right thing.

I don't dispute using generation number may not be a bad idea and may perform better. However, if we really look into the details, it is not easy for current code structure. Since we have something already working, it is not wise to mess this code layout at this moment.

Make sense ?

-- Wendy

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]