Eddie Horng:
> e. in step 8, mkdir invokes nfs_lookup_revalidate
> f. server side again run into: nfsd -> nfsd_lookup -> aufs::aufs_encode_fh
> g. this time, aufs_encode_fh returns filehander of folderA in br0(rw)
> i. in nfs_lookup_revalidate, nfs_compare_fh(NFS_FH(inode), fhandle) is
> called after revalidate, and the filehandler of folderA changes, 0x4100...
> -> 0x4000...
> j. finally in dcache.c filename_create->lookup_dcache->d_invalidate drop
> the dentry of folderA

No, d_invalidate() doesn't call d_drop(folderA) since it is a positive
dentry. When nfs_compare_fh(NFS_FH(inode), fhandle) fails, VFS lookup it
again, and may_create() returns EEXIST.
Isn't there "if (!dentry->d_inode)" condition in your d_invalidate()?


> k. getcwd then failed on the unlinked dentry of folderA

No, it should not fail nor it is not unlinked.

I have confirmed on Ubuntu-4.10.0-34.38 kernel. The kernel configuration
is for my test environment, so it must be different from yours. But I am
not sure whether the config is related.


J. R. Okajima

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Reply via email to