Following the findings collected in issue #17827 this PR removes the specific macOS code in favor of the generic fallback. Hence, APFS volumes with just enough free space can still complete the IBD.
ftruncate behaves erratically when used in an APFS volume, generating rev*.data files with a size considerably bigger than expected.
Using the generic method solves the problem and works for both APFS and HFS+.