defrag: removed unused functions
tests: fixed build under linux
tests: add retry on read failure
data-sort: fixed cleanups