sbin/hammer: Use last active big-block to limit recovery scan range
This commit is to fix a bug mentioned in
f2dd4b0c. This commit
uses offset of the last active big-block (big-block with maximum
zone-2 offset whose layer2->zone is neither 0,4,15), as an upper
limit of scan range, so it doesn't scan beyond actual consumption.
Note that this upper limit is used only if all layer1/2 entries
have correct CRC values. Otherwise the entire image is scanned
as usual (unless quick option is used).
Note that this upper limit doesn't necessarily equal a big-block
before the first unused big-block offset (i.e. layer2->zone == 0),
because reblock could locate unused big-block between used ones.
Note that using the upper limit also tries to avoid recovery of
irrelevant files from old filesystem that could exist beyond the
upper limit (if not perfect). It also speeds up recovery process.