This adds the helpers which are needed by both repair and compaction to add incremental repair support.