[reiserfs-list] Re: [OpenAFS-devel] more on the 2.2.18pre17 SMPcpu hog/etc.

Vladimir V. Saveliev monstr@namesys.com
Mon, 04 Dec 2000 17:03:58 +0300


Hi

Danilov Nikita wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
>
> Hi,
>
> Hans Reiser writes:
>  > Nikita has code not in our main branch that allows looking up files by their keys, we did it for
>  > squid when writing a namefree file store for it, let's give him a chance to comment on Monday.
>
> if you are still interested in it, that is what was done for the
> lookup-by-key stuff:
>
> (*) there is ioctl to get key of open file descriptor
> (*) there is special ram-only fs (like /proc) to open files on given
> reiserfs mount by the keys.
>
>  >
>  > Hans
>  >
>  > Chris Mason wrote:
>  > >
>  > > On Saturday, December 02, 2000 15:33:58 -0500 Derek Atkins
>  > > <warlord@MIT.EDU> wrote:
>  > >
>  > > > I don't know anything about reiserfs, but I can explain what AFS is
>  > > > doing.  Basically, the afsd user-space process does an opendir() on
>  > > > the cache directory.  Then it iterates through the files looking for
>  > > > the cache files (they are all numbered, and the cachefile number is
>  > > > stored in the filename).  For each cache file, it stores the inode
>  > > > number (obtained from dirp->d_ino from readdir()) associated that that
>  > > > cache file number (obtained from dirp->d_name).
>
> So, call ioctl in stat's stead and remember key.
>

reiserfs_readdir could put packing locality component after 0 in dirp->d_name and set dirp->d_reclen
correspondingly for those who is aware of reiserfs tricks.

Thanks,
vs