Whamcloud - gitweb
e2fsck: handle multiple *ind block collisions with critical metadata
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 27 Jan 2015 18:05:51 +0000 (13:05 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 27 Jan 2015 18:12:59 +0000 (13:12 -0500)
commit5e61441a4026d410fb8466eb93cf0375e32836d3
tree6f8aaf7b35d284afed70da2a95712142f11ed4e1
parentb151d346d4f12158bebd2794da224acc76140cd3
e2fsck: handle multiple *ind block collisions with critical metadata

An earlier patch tried to detect indirect blocks that conflicted with
critical FS metadata for the purpose of preventing corrections being
made to those indirect blocks.  Unfortunately, that patch cannot
handle more than one conflicting *ind block per file; therefore, use
the ref_block parameter to test the metadata block map to decide if
we need to avoid fixing the *ind block when we're iterating the
block's entries.  (We have to iterate the block to capture any blocks
that the block points to, as they could be in use.)

As a side note, in 1B we'll reallocate all those conflicting *ind
blocks and restart fsck, so the contents will be checked eventually.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c
tests/f_ind_inode_collision/expect.1 [new file with mode: 0644]
tests/f_ind_inode_collision/expect.2 [new file with mode: 0644]
tests/f_ind_inode_collision/image.gz [new file with mode: 0644]
tests/f_ind_inode_collision/name [new file with mode: 0644]