From: Aneesh Kumar K.V Date: Fri, 28 May 2010 19:26:57 +0000 (-0500) Subject: ext4: Fix file fragmentation during large file write. X-Git-Tag: v2.6.27.48~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4a4420cd056a7dcc4134dd6df6314d0960ba39f;p=pandora-kernel.git ext4: Fix file fragmentation during large file write. commit 22208dedbd7626e5fc4339c417f8d24cc21f79d7 upstream. 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 Signed-off-by: Theodore Ts'o [dev@jaysonking.com: Some changed lines from the original version of this patch were dropped, since they were rolled up with another cherry-picked patch applied to 2.6.27.y earlier.] [dev@jaysonking.com: Use of wbc->no_nrwrite_index_update was dropped, since write_cache_pages_da() implies it.] Signed-off-by: Jayson R. King Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed