From: Hristo Venev Date: Sat, 7 May 2022 17:07:00 +0000 (+0300) Subject: cache: tolerate short writes in print_slot X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/852cb3b0e267dd2ddfd2eeef6275435098c606e7?ds=sidebyside;hp=852cb3b0e267dd2ddfd2eeef6275435098c606e7 cache: tolerate short writes in print_slot sendfile() can return after a short read/write, so we may need to call it more than once. As suggested in the manual page, we fall back to read/write if sendfile fails with EINVAL or ENOSYS. On the read/write path, use write_in_full which deals with short writes. Signed-off-by: Hristo Venev Signed-off-by: Jason A. Donenfeld ---