xfs_repair: use rmap btree data to check block types
Originally-From: Dave Chinner <dchinner@redhat.com>
Use the rmap btree to pre-populate the block type information so that
when repair iterates the primary metadata, we can confirm the block
type.
Ensure that we remove the flag bits from blockcount before using the
length field.
When we're processing rmap records, we set the bmap state of
the entire extent, not just the first block of the extent. This
enables us to catch improperly overlapping rmap records and later to
ensure that the entire primary metadata extent matches (owner-wise)
the reverse mapping. It also enables us to catch the case where the
rmapbt maps something that isn't pointed to by primary metadata.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
[darrick.wong@oracle.com: split patch, strip flag bits from blockcount] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>