Dave Chinner 309c848002 xfs: delayed alloc blocks beyond EOF are valid after writeback
There is an assumption in the parts of XFS that flushing a dirty
file will make all the delayed allocation blocks disappear from an
inode. That is, that after calling xfs_flush_pages() then
ip->i_delayed_blks will be zero.

This is an invalid assumption as we may have specualtive
preallocation beyond EOF and they are recorded in
ip->i_delayed_blks. A flush of the dirty pages of an inode will not
change the state of these blocks beyond EOF, so a non-zero
deeelalloc block count after a flush is valid.

The bmap code has an invalid ASSERT() that needs to be removed, and
the swapext code has a bug in that while it swaps the data forks
around, it fails to swap the i_delayed_blks counter associated with
the fork and hence can get the block accounting wrong.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-12-01 07:40:20 -06:00
..
2010-07-26 13:16:33 -05:00
2010-05-21 18:31:19 -04:00
2009-06-10 17:07:47 +02:00
2010-10-18 15:08:07 -05:00
2009-12-14 23:08:16 -06:00
2010-10-18 15:08:07 -05:00
2010-10-18 15:08:07 -05:00
2010-10-18 15:08:07 -05:00
2007-10-15 16:49:49 +10:00
2009-03-29 09:55:42 +02:00
2010-10-18 15:08:07 -05:00
2007-10-15 16:49:49 +10:00
2008-12-01 11:37:35 +11:00
2010-07-26 13:16:44 -05:00
2010-10-18 15:08:07 -05:00
2010-10-25 21:26:11 -04:00
2009-08-31 14:46:22 -05:00
2010-10-18 15:08:07 -05:00
2010-10-18 15:08:06 -05:00
2010-07-26 13:16:33 -05:00
2010-10-18 15:08:07 -05:00
2010-10-18 15:08:02 -05:00
2010-10-18 15:08:06 -05:00
2010-10-18 15:08:06 -05:00
2010-10-18 15:08:06 -05:00
2009-12-14 23:08:16 -06:00