sbin/hammer: Fix get_buffer_data()'s wrong xor for undo buffer caching
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 24 Jun 2017 23:17:09 +0000 (02:17 +0300)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 7 Jul 2017 05:43:00 +0000 (08:43 +0300)
commite179dc662730328d2e2ab43f659c0d2fc9319d98
treee7e62da74949a0cfd57fb6dc9d4818d9e863493f
parent63eacb74267a5a2776a215b529ab1a6f6939b80b
sbin/hammer: Fix get_buffer_data()'s wrong xor for undo buffer caching

As mentioned in 830ab40e
"sbin/hammer: Redo e4323571 partly (after reverted by 03d5db37)",
830ab40e (originally by e4323571) fixed a bug for get_buffer_data()
wrongly taking xor of zone-X offset and zone-2 offset, where X is
one of the direct zones other than zone-2.

This commit fixes it for indirect zone which is zone-3 (and only
zone-3 in this case). The reason zone-3 being different is because
zone-3 to zone-2 translation isn't direct mapped, but instead the
volume header has a pointer to big-blocks that belong to zone-3.

Also see 0942cbbc which made this xor bug clear.
sbin/hammer/ondisk.c