780527d00a
Now, instead of reverting only the first block on powerloss, _all_ blocks since the last sync are reverted (except the in-flight block, if you reverted that it would be the same as noop powerloss). It was a bit frustrating trying to reproduce known holes in our sync logic before this, but reverting all blocks really is the worst case, so we should have quite a bit more confidence going forward. This was a bit tricky to implement without memory leaks everywhere, since we need to be able to resume for exhaustive powerloss testing. But emubd's copy-on-write block emulation really shines here.