Skip to content

lib/cache: handle posix_fallocate returning EOPNOTSUPP (Linux/musl)

Vladimír Čunát requested to merge fix-fallocate-error-check into master

https://man7.org/linux/man-pages/man3/posix_fallocate.3.html#ERRORS:

EOPNOTSUPP The filesystem containing the file referred to by fd does not support this operation. This error code can be returned by C libraries that don't perform the emulation shown in NOTES, such as musl libc.

I've encountered this problem on Alpine Linux running inside an LXC container on Ubuntu with data on ZFS.


Originally submitted as https://github.com/CZ-NIC/knot-resolver/pull/76

Merge request reports