Use a separate file handle for file truncation & allocation
Rename functions, and fix error handling
Merged fallocate-restructure before merging Mark's changes: cherry pick
9d7ffe7, 3ce43ba into develop.
Remove __open_directory_sync call, not needed on Windows.
Typo, clear the right file handle on error.