Return EIO on failed read

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
This commit is contained in:
Andrew Gaul 2014-10-03 18:47:52 -07:00
parent 38e6857824
commit a1ca8b7124

View File

@ -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){