Fix some serious bugs in fsrecover.
When a corrupted record is found, it guesses a location for the next good transaction header. If the guessed location happened to have a 'c' character at just the right spot, it would think it was at the end of the file. Fix in off-by-one bug in scan() that lead to failure. Do more sanity checks for invalid transaction headers following a scan. Use restore() instead of store() to copy data. This change should maximize the chance that the recovered storage is identical except for the damaged records. Add tests from the trunk and remove test in testFileStorage.
Showing
Please register or sign in to comment