Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!pur-ee!mentor.cc.purdue.edu!mjs From: mjs@mentor.cc.purdue.edu (Michael J Spitzer) Newsgroups: comp.unix.questions Subject: Re: faster fopen Keywords: namei cache Message-ID: <3033@mentor.cc.purdue.edu> Date: 19 Jun 89 19:02:25 GMT References: <3941@tank.uchicago.edu> Reply-To: mjs@mentor.cc.purdue.edu (Michael J Spitzer) Organization: Purdue University Lines: 16 In article <3941@tank.uchicago.edu> phd_ivo@gsbacd.uchicago.edu writes: >I have a set of files which never change on my harddisk. I would like >to index them, so that a program can open any of these files without >having to first read the directory entry. Is there a way I can open >files by some other obtained information (e.g. an inode?) and not >waste time with a directory access? There is no efficent way to access a file from user level given only its inode number. The 4.3BSD namei already maintains a name-cache for name -> inode translations, so you generally won't be "wasting time" doing a directory lookup if the file has already been referenced. -mjs -- Michael J. Spitzer Purdue University Computing Center mjs@mentor.cc.purdue.edu pur-ee!mentor.cc.purdue.edu!mjs