sbin/hammer: Add full mode for hammer recover to revive full scan
commit3d9006655df747a9297e533e784e94fc790b0a29
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 10 Dec 2016 06:21:00 +0000 (10 15:21 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 10 Dec 2016 13:28:53 +0000 (10 22:28 +0900)
tree83ac571b4d913e7517713fc0cac9ba53620edabd
parente3cefcca0f8c732eefd2b64b9ab39bb8b06784b3
sbin/hammer: Add full mode for hammer recover to revive full scan

This commit revives the original full scan recovery by adding full
option, after the previous commit introduced offset limit.
Apparently, both full option and quick option can't be specified.

To summarize 3 modes,

1. default - Full scan, but only upto the last big-block being used.
2. full - Full scan, which scans the entire fs image with no limit.
3. quick - B-Tree only scan, plus associated records in other zones.

1. was introduced (by the previous commit) to fix a bug, as well as
  to avoid irrelevant files.
2. was introduced (by this commit) to revive the original full scan
  recovery behavior, which is by far the slowest, but most reliable
  in terms of recovery except for the above bug.
3. was introduced (by e819b271) to speed up the recovery process,
  provided B-Tree zone is not corrupted. This is the fastest.
sbin/hammer/cmd_recover.c
sbin/hammer/hammer.8
sbin/hammer/hammer.c