chunkio
chunkio copied to clipboard
Handle fallocate errors on legacy linuxes
Older linuxes as e.g. SLES 11 SP4 does not return EOPNOTSUPP for not supported filesystem. Instead it returns the generic -1 failure and sets the errno with description Operation not supported. This fix does instead check if the operation failes with a non zero return value and in such cases revert to posix_fallocate. Other errors as e.g. ENOSPC will hence rely to be returned by the call to posix_fallocate.
Signed-off-by: sirwio [email protected]