[OpenAFS] Re: Problem with openafs-1.3.81 on kernel 2.6.11.7

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Fri, 15 Apr 2005 17:59:14 -0400


In message <20050415164546.GB23640@alchar.org>,Kris Van Hees writes:
>I wonder if ext2 itself might defer truncates as well in newer kernels.  I'll
>have a look at that.

it looks like we are getting bitten by preallocation in the ext2 
filesystem combined with an optimization in inode_setattr().  2.6's
inode_setattr has the following test:

                if (attr->ia_size != i_size_read(inode)) {
                        error = vmtruncate(inode, attr->ia_size);
                        if (error || (ia_valid == ATTR_SIZE))
                                goto out;
                } else {

so ext2_truncate() isnt called on cache file open to get rid of 
the preallocations.   or so i think.