> when we open a file, how solaris get the vnode of
> this file from the path of 
> the file??? related with dnlc????

Use the source, Luke:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/syscall/open.c#195
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/vnode.c#943
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/lookup.c#lookupnameat
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/lookup.c#lookuppnat
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/lookup.c#194
and once it hits VOP_LOOKUP(), I gather it gets into filesystem-specific code.
For UFS, I think that's
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/ufs/ufs_vnops.c#ufs_lookup
which looks like it does use the DNLC.  For other filesystems, you might have
to check each one.  Or maybe they all use it, I haven't checked; that's _your_
homework...
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to