When "use sendfile" is enabled but not supported by the underlying VFS
module then fallback to normal copy and print out a warning for the
admin.
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
goto normal_read;
}
+ if (errno == ENOTSUP) {
+ set_use_sendfile(SNUM(fsp->conn), false);
+ DBG_WARNING("Disabling sendfile use as sendfile is "
+ "not supported by the system\n");
+ goto normal_read;
+ }
+
if (errno == EINTR) {
/*
* Special hack for broken Linux with no working sendfile. If we