[btrfs-devel][patch]fix for btrfs_truncate_in_trans

Christoph Hellwig hch at lst.de
Tue Sep 18 06:59:32 PDT 2007


On Tue, Sep 18, 2007 at 09:47:09AM -0400, Chris Mason wrote:
> > When allocation doesn't really happen, there is no extent item. So
> > btrfs_truncate_in_trans finds nothing and i_blocks isn't updated.
> 
> Ok, that makes sense.  Christoph, what fits best in with your delalloc
> plans for XFS?  Should extent_invalidatepage return some information
> about the number of delalloc bytes it found so that
> btrfs_invalidatepage can drop i_blocks?
> 
> At the start of btrfs_truncate, we call btrfs_drop_extent_cache.  That
> could also send back information on the number of delalloc extent maps
> that were found.

I still haven't gotten truncate to work, but as far as i_block is
concerend I couldn't care less.  The only place i_blocks is acutally
used is generic_fillattr which XFS doesn't use.  XFS does it's internal
space used accounting and we just copy that directly in struct kstat.



More information about the Btrfs-devel mailing list