Possible optimization here is to store a data checksum in the file metadata as an extended attribute. Not suggesting you make this change now, but worth looking into once this lands.