ext4: Add a comprehensive block validity check to ext4_get_blocks()
authorTheodore Ts'o <tytso@mit.edu>
Sun, 17 May 2009 19:38:01 +0000 (15:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 17 May 2009 19:38:01 +0000 (15:38 -0400)
commit6fd058f7791087648c683eb8572edf3be3c4c23c
tree0d80791532d2d022c91f20013003716eaf0afb40
parent2ac3b6e00acb46406c993d57921f86a594aafe08
ext4: Add a comprehensive block validity check to ext4_get_blocks()

To catch filesystem bugs or corruption which could lead to the
filesystem getting severly damaged, this patch adds a facility for
tracking all of the filesystem metadata blocks by contiguous regions
in a red-black tree.  This allows quick searching of the tree to
locate extents which might overlap with filesystem metadata blocks.

This facility is also used by the multi-block allocator to assure that
it is not allocating blocks out of the system zone, as well as by the
routines used when reading indirect blocks and extents information
from disk to make sure their contents are valid.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/Makefile
fs/ext4/block_validity.c [new file with mode: 0644]
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/inode.c
fs/ext4/mballoc.c
fs/ext4/super.c