It was possible to see "data digests are inconsistent" being output to the logs at incorrect times due to multiple bugs. This code reorganises some of the deep scrubbing code and fixes the issues. The root cause of the issue that is being fixed here is:
* We were comparing crc buffers beyond the end of the crcs
* There was a double call to logical_to_ondisk_size when creating the crcs for zero buffers, causing them to be mis-sized
* The code was not padding smaller shards as its a requirement for shards to be the same sized when used for parity comparison.
All the above are fixed in this commit
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>