pass1 was checking that an "extent's" start+len did not extend
past the last filesystem block, but unless we are at a leaf
block, the physical block is that of a node in the tree, and
the length may include sparseness. The test is only valid
for leaf blocks.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
if (extent.e_pblk < ctx->fs->super->s_first_data_block ||
extent.e_pblk >= ctx->fs->super->s_blocks_count)
problem = PR_1_EXTENT_BAD_START_BLK;
- else if ((extent.e_pblk + extent.e_len) >
+ else if (is_leaf &&
+ (extent.e_pblk + extent.e_len) >
ctx->fs->super->s_blocks_count)
problem = PR_1_EXTENT_ENDS_BEYOND;