[OpenAFS] Re: OpenAFS 1.4.2fc2 and Vanilla Linux kernel 2.6.18

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Fri, 13 Oct 2006 10:50:17 -0400


In message <17894.142.100.131.7.1160742580.squirrel@webmail.cs.wisc.edu>,"Marc 
Dionne" writes:
>Does this kernel have i_blksize in struct inode?
>afs_osi_Stat() has this recent patch to deal with the missing i_blksize:
>
> #ifdef STRUCT_INODE_HAS_I_BLKSIZE
>     astat->blksize = OSIFILE_INODE(afile)->i_blksize;
> #endif
>... so perhaps astat->blksize is never initialized?  The kernel code
>itself seems to use "(1 << inode->i_blkbits)" as a replacement for
>inode->i_blksize in fs/stat.c

this is acutally in the cache manager and has little to do with
the problem in question (atleast so i suspect).  i_blksize was
replaced by i_blkbits so there is some code missing.  vattr2inode() is
not updating i_blkbits.  there should probably be something like:

#ifdef STRUCT_INODE_HAS_I_BLKBITS
	ip->i_blkbits = 12;	/* comes from PAGESIZE */
#endif

i dont know a good fast way to do log2 in the kernel so.  it would
probably make more sense to just make va_blocksize use 4k blocks since
it doesnt particularly matter anyway.

as for afs_osi_Stat(), oddly enough it seems that osi_stat's blksize
member is not used in any meaningful way.  could just be eliminated
i imagine.

i dont think this will fix the df problem though.