Commit Graph

5 Commits (master)

Author SHA1 Message Date
Darrick J. Wong 6509eebb63 libext2fs: set interior tree block goal more intelligently
When we're splitting an extent node, try to allocate the new interior
tree block just prior to the first extent in the block we're trying to
split.  The previous logic only set a goal block if we had to split
both the current node and its parent, which is somewhat infrequent.
When that would happen, the goal would start at zero, leading to poor
locality.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-12-13 20:14:14 -05:00
Darrick J. Wong 7b486ec08c 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>
2014-12-13 20:07:13 -05:00
Theodore Ts'o d5a74ff10b e2fsck: Fix double-counting of non-contiguous extent-based inodes
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-12-22 01:23:59 -05:00
Theodore Ts'o 63b5e354d9 e2fsck: Fix check to see if an extent-based file is fragmented
Also added support for "e2fsck -E fragcheck" which issues a
comprehensive report of discontiguous file extents.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-10 22:43:24 -04:00
Theodore Ts'o dfb1d42a56 f_extents2: Add new test case testing e2fsck's support for extents
This test case tests blocks claimed by multiple inodes, as well as
other forms of invalid extents.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-02 20:36:52 -04:00