chunkio icon indicating copy to clipboard operation
chunkio copied to clipboard

Handle fallocate errors on legacy linuxes

Open sirwio opened this issue 3 years ago • 0 comments

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]

sirwio avatar Mar 25 '21 14:03 sirwio