Subject: Re: how to change swapctl() interface.
To: None <fair@clock.org>
From: Wolfgang Solfrank <ws@tools.de>
List: tech-kern
Date: 05/27/1998 16:23:02
Hi,
> 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...
Actually, there needn't be a name associated with an inode at all any more.
It might have been deleted in the meanwhile...
> 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.
Incidently, I've got a related problem which I'm not sure how to handle.
See my other message to this list.
> Now, just why was it that you wanted to do this?
As far as I understand the original proposal, it's exactly because it's
difficult to find the name to an inode. You might want to know the name
of your swap file for various reasons. Since it's now possible to swap
to ordinary files, the device information gathered during swap establishment
doesn't suffice any more.
Ciao,
Wolfgang
--
ws@TooLs.DE (Wolfgang Solfrank, TooLs GmbH) +49-228-985800