vn_fullpath() again

Sergey Uvarov uvarovsl at mail.pnpi.spb.ru
Mon Sep 5 06:52:20 PDT 2005


Hello hackers,

all knows that vn_fullpath() is unreliable. However I really need to get 
a filename for a given vnode. To simplify the task, I do not care of 
synthetic file systems or hardlinks.

I have looked through archives in hope to find a better solution. It 
seems that linux_getcwd() approach could help. However to make that code 
work for me, I need to know a directory vnode where the file resides. 
vnode->v_dd field looks promising. But as I understand it did not help 
if file name is not in a name cache.

So the question: is it ever possible to get directory vnode for a given 
file vnode?

Thank you in advance,
	Sergey.


More information about the freebsd-hackers mailing list