ext4: fix block bitmap initialization under sparse_super2
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 12 May 2014 14:16:06 +0000 (10:16 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 12 May 2014 14:16:06 +0000 (10:16 -0400)
commit1beeef1b5643a16a07a465632a2cf984a4ef2119
tree5acce4c5f364d8479af7519af04a8689d31b7a18
parentbd63f6b0cd577e94846869db0c86a7b2bee79b26
ext4: fix block bitmap initialization under sparse_super2

The ext4_bg_has_super() function doesn't know about the new rules for
where backup superblocks go on a sparse_super2 filesystem.  Therefore,
block bitmap initialization doesn't know that it shouldn't reserve
space for backups in groups that are never going to contain backups.
The result of this is e2fsck complaining about the block bitmap being
incorrect (fortunately not in a way that results in cross-linked
files), so fix the whole thing.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/balloc.c
fs/ext4/ext4.h