[reiserfs-list] RE: [OpenAFS-devel] weird issue with reiserfs on 2.4.3 and openaf s

Chris Mason mason@suse.com
Wed, 11 Apr 2001 15:44:54 -0500


On Wednesday, April 11, 2001 03:11:52 PM -0500 "Neulinger, Nathan"
<nneul@umr.edu> wrote:

>> > If so, perhaps when we initiate the cache file we can
>> > check if it's reiserfs and, if so, open the inode (which is 
>> currently
>> > in the cache), grab the extra data, save the extra data (somewhere),
>> > and then release it.  Then, later, we can check the saved data and
>> > notice that the file was reiserfs and behave specially.
>> > 
>> > I really don't like this solution.. It's a complete kludge and
>> > special-case for reiserfs..  But I think it would solve our problem
>> > until, as you say, we move to 64-bit inodes :)
>> > 
>> 
>> This is what I had in mind.  Where would we store the extra 
>> stuff in AFS?
> 
> The in-kernel stuff that keeps track of the inode numbers for the cache
> file will need modified to keep track of additional stuff. 
> 
> So, presuming you can get me code to obtain that extra bit of
> information, I can work on adding the code to the afs kernel module to
> keep track of it. Once that is done, we can have add the code to use
> iget4.
> 
> Is iget4() something standardized? I.e. will it be as simple as:

standardized in the sense that few people like it and reiserfs abuses it,
yes.  We added a read_inode2 call that iget4 calls when provided by the FS.
Only reiserfs provides it right now, iget4 sends it the opaque pointer in
addition to the normal read_inode stuff.

iget4(super, inode_num, find_actor, void *opaque)

find_actor is a function pointer, If present, gets called with the opaque
data.

Note iget is an inline func that calls iget4(super, inode_num, NULL, NULL).

reiserfs uses iget4 internally, such that iget4(super, inode_num, NULL,
&(packing locality int)) will get you a good inode back.  

In this specific case where all cache files are in a single subdir (with no
additional subdirs underneath), AFS could

int reiserfs_specific = cache_dir_inode->i_ino ;
struct inode *inode = iget4(super, inum, NULL, &reiserfs_specific) ;

Instead of calling iget.  It should work, even on ext2 or the others
because only reiserfs uses read_inode2.

Since we really want something non-reiserfs specific, we'll work out an api.

-chris