Whamcloud - gitweb
libext2fs: find inode goal when allocating blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 14 Dec 2014 01:00:36 +0000 (20:00 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 14 Dec 2014 01:07:13 +0000 (20:07 -0500)
commit7b486ec08cda3bc67b7f6bdcbcc9cb5783322e6c
tree68766f900bcbfef18277e685be67fac0b1564a71
parentbc57b123d61f49cddcc3fb594fda2dcf589f9b38
libext2fs: find inode goal when allocating blocks

Try to be a little smarter about where we go to allocate blocks for a
inode.  For a given inode and logical offset, set the goal as if the
file were physically continuous.  If it's bmapped, just start looking
at wherever lblk 0 is.  If that's not possible (the file has no
lblk>pblk mappings, inline data, etc.) then start looking in the
inode's block group.

[ Fixed memory leak --tytso ]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass2.c
lib/ext2fs/alloc.c
lib/ext2fs/bmap.c
lib/ext2fs/expanddir.c
lib/ext2fs/ext2fs.h
lib/ext2fs/ext_attr.c
lib/ext2fs/extent.c
lib/ext2fs/mkdir.c
lib/ext2fs/symlink.c
tests/f_extent_oobounds/script
tests/f_extents2/expect.1