vn_fullpath()

Deomid Ryabkov myself at rojer.pp.ru
Mon Feb 21 06:15:15 PST 2005


This is an interesting discussion.
As far as I understand, a function for performing reverse (object -> 
filename) lookup
is being discussed.
Having such a function would help me with implementation of my custom 
changes-tracking filesystem
(I once started a discussion of such a thing on this list).
I don't think i'm able to actually help with making vn_fullpath() reliable,
but I'm definitely the one who's interested in the end result :)
With such a call at hand i could actually begin writing my filesystem 
(changes-tracking wrapper for UFS).
As to hard links, they will be simply disallowed.
What are the other edge cases, beside hard links, that need to be taken 
care of?

Robert Watson wrote:

>On Sun, 20 Feb 2005, Igor Shmukler wrote:
>
>  
>
>>I was wondering if anyone has figured a way to make vn_fullpath()
>>reliable? 
>>    
>>
>
>It depends a lot on the requirements.  There are some nasty edge cases
>where the process of determining a name for an object can be quite
>expensive.  Here's one of them:
>
>  ln /usr/local/etc/apache/httpd.conf /usr/local/etc/apache.old/httpd.conf
>  reboot
>  apachectl start
>  rm /usr/local/etc/apache/httpd.conf
>
>Now generate the name of the file that Apache has open.  Note that you
>can't just look in the name cache, because the object has a name but the
>name used to open the object has been invalidated.  And UFS even knows it
>has a name, because the link count remains non-zero when the unlink of one
>of the names occurs -- but the only way it can find the other name is to
>search the file system. 
>
>So the first thing to do is to decied what your requirements are: are you
>willing to fail in the edge cases like the above?  If so, life is a lot
>easier :-). 
>
>Robert N M Watson
>
>
>_______________________________________________
>freebsd-hackers at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>  
>
--
Deomid Ryabkov aka Rojer
myself at rojer.pp.ru
rojer at sysadmins.ru
ICQ: 8025844

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3228 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050221/7fdca17c/smime.bin


More information about the freebsd-hackers mailing list