ext4: Fix file fragmentation during large file write.
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 16 Oct 2008 14:10:36 +0000 (10:10 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 16 Oct 2008 14:10:36 +0000 (10:10 -0400)
commit22208dedbd7626e5fc4339c417f8d24cc21f79d7
treed03fc8524dc7cb2f18c2038ffe4d2146903f630e
parent17bc6c30cf6bfffd816bdc53682dd46fc34a2cf4
ext4: Fix file fragmentation during large file write.

The range_cyclic writeback mode uses the address_space writeback_index
as the start index for writeback.  With delayed allocation we were
updating writeback_index wrongly resulting in highly fragmented file.
This patch reduces the number of extents reduced from 4000 to 27 for a
3GB file.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c