Don't report PR_1_EXTENT_END_OUT_OF_BOUNDS on verity files during
scan_extent_node(), since they will have blocks stored past i_size.
This was missed during the earlier fix because this check only triggers
if the inode has enough extents to need at least one extent index node.
This bug is causing one of the fs-verity xfstests to fail with the
reworked fs-verity patchset.
Fixes:
3baafde6a8ae ("e2fsck: allow verity files to have initialized blocks past i_size")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
else if (extent.e_lblk < start_block)
problem = PR_1_OUT_OF_ORDER_EXTENTS;
else if ((end_block && last_lblk > end_block) &&
- (!(extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT &&
- last_lblk > eof_block)))
+ !(last_lblk > eof_block &&
+ ((extent.e_flags & EXT2_EXTENT_FLAGS_UNINIT) ||
+ (pctx->inode->i_flags & EXT4_VERITY_FL))))
problem = PR_1_EXTENT_END_OUT_OF_BOUNDS;
else if (is_leaf && extent.e_len == 0)
problem = PR_1_EXTENT_LENGTH_ZERO;