fa.netbsd.tech.kern
[Top] [All Lists]

Re: inode open

Subject: Re: inode open
From: Bill Stouder-Studenmund <wrstuden@xxxxxxxxxx>
Date: Thu, 17 Jul 2008 02:36:15 UTC
Newsgroups: fa.netbsd.tech.kern
On Wed, Jul 16, 2008 at 08:32:24PM -0400, Kurt J. Lidl wrote:
> On Wed, Jul 16, 2008 at 02:46:31PM -0700, Bill Stouder-Studenmund wrote:
> > On Wed, Jul 16, 2008 at 01:15:31AM -0700, Adam Burkepile wrote:
> > > Is there an open function that will open a file based on its inode  
> > > number instead of a path?
> > 
> > Why?
> 
> Well, the traditional answer for this type of interface is "speed".

Yes, but the point of the question was not why would someone want it, but 
why did Adam want it. :-)

> I reference the "Backup Copilot" product from SunSoft.  It was
> a replacement for the traditional "dump"/"restore" programs and
> went way, way, faster (at least for dumps).  And it used an open-by-inode
> interface to get at the file data, as I recall.

A cleaner way to do this is, back whe you know the path, do a getfh() on 
the path and get the file handle. Then fhopen() works for you. And if 
you're a backup daemon, chances are you're running as root already.

Take care,

Bill
<Prev in Thread] Current Thread [Next in Thread>