Whamcloud - gitweb
libext2fs: fix endian handling error; reduce fragmentation some
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 8 Nov 2014 02:27:53 +0000 (21:27 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 8 Nov 2014 02:27:53 +0000 (21:27 -0500)
commit407916f5af4443e0ddd9469c57fc1684c07f9294
tree750d9c6c3f9a7d242dfab364586ac65dec34dcb6
parentfecb231f6fc83cf4b4ddf7ec34ace3723803a499
libext2fs: fix endian handling error; reduce fragmentation some

If we're going to read the "nr - 1" entry in an indirect block for use
as a "goal" input to the block allocator, we need to byteswap the
entry.  While we're at it, if we're allocating blocks for the zeroth
entry in the indirect block, we might as well use the indirect block
as the starting point to try to reduce fragmentation.

(d_fallocate_blkmap will test this...)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/bmap.c