Subject: Re: how to change swapctl() interface.
To: matthew green <mrg@eterna.com.au>
From: Erik E. Fair <fair@clock.org>
List: tech-kern
Date: 05/26/1998 12:43:32
No file has a canonical name, unless its link count is one. In order to
find the name(s) associated with an inode, you have to search *all*
directories in the filesystem in which the inode resides to find the
references to it. If you thought namei() was expensive...
One other issue - if you're accepting names into the interface and need to
compare to see if two names reference the same file, you gotta go a namei()
on them both and see if they both end up at the same inode - string compare
will not catch all the cases.
Substitude "vnode" terminology here as appropriate to match modern UNIX
filesystem implementation - these issues have been with us from the deep
and misty past.
Now, just why was it that you wanted to do this?
curious,
Erik <fair@clock.org>