From a1ca8b712401dd242273c138ca1f65d69cfcc605 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 3 Oct 2014 18:47:52 -0700 Subject: [PATCH] Return EIO on failed read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously S3fsMultiCurl::MultiRead did not report read errors since it did not treat failed callback setup as a fatal operation error. Failed callback setups usually result from exceeding the number of allowed retries. Previously cp did not report an error during a network outage but now does: $ cp ~/s3-path/s3-file . cp: error reading ‘/home/gaul/s3-path/s3-file’: Input/output error cp: failed to extend ‘./s3-file’: Input/output error --- src/curl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/curl.cpp b/src/curl.cpp index b6613a8..0566b1a 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -3280,8 +3280,8 @@ int S3fsMultiCurl::MultiRead(void) if(NULL != (retrycurl = RetryCallback(s3fscurl))){ cMap_all[retrycurl->hCurl] = retrycurl; }else{ - // do not care, but set... - isRetry = false; + // Could not set up callback. + return -EIO; } } if(s3fscurl != retrycurl){