Subject: Re: determining an iso from vnd
To: George Georgalis <george@galis.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 02/01/2007 12:49:42
> >glacier:/opt/rainier/pkgsrc$ sudo vnconfig -l
> >vnd0: /opt (/dev/wd0f) inode 625836
> >vnd1: not in use
> >vnd2: not in use
> >vnd3: not in use
> >
> >glacier:/opt/rainier/pkgsrc$ find /opt -xdev -inum 625836 2>/dev/null
> >/opt/home/reed/netbsd-i386.iso
> 
> thanks. that works.
> 
> however, this system is fairly new, and part of the design yeilds
> a million billion hard links to files on the partition. in other
> words we do frequent rsync hardlink snapshots on the partition
> with a lot of files. Soon, the find command will take a long time.

Maybe the vnode "vattr" structure could be extended to also keep track of 
the vnd_file. And then the vnd_user structure to get that also.

> I expect the answer is no, but any thoughts on a more direct
> alternative (short of find prune path backup) to using find to
> discover the file? eg shouldn't we be able to use stat to look up
> the file attributes, like name and path, from the inode?

The stat structure doesn't contain the pathname. The stat function can't 
use the "inode" to get info. But maybe there is something else?

  Jeremy C. Reed