mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
Windows: not all short rx_Read[v] reads are fatal
When performing a RXAFS_FetchData[64] RPC, a short read from rx_Read[v] is not a reason to stop processing the call unless it is the first read and the file server FetchData offset bug has been detected. If not, only stop processing if the rx_Read[v] return value is <= 0. Change-Id: I5b10ce7903686fa3d9c251e6c92c4bcec376ed40 Reviewed-on: http://gerrit.openafs.org/7749 Reviewed-by: Derrick Brashear <shadow@dementix.org> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
606d9554e2
commit
6fb3b7aa31
@ -1987,11 +1987,13 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp
|
||||
* length_found and continue as if the file server said
|
||||
* it was sending us zero octets of data.
|
||||
*/
|
||||
if (fs_fetchdata_offset_bug && first_read)
|
||||
if (fs_fetchdata_offset_bug && first_read) {
|
||||
length_found = 0;
|
||||
else
|
||||
break;
|
||||
} else if (temp <= 0) {
|
||||
code = (rx_Error(rxcallp) < 0) ? rx_Error(rxcallp) : RX_PROTOCOL_ERROR;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
iov = 0;
|
||||
@ -2064,11 +2066,13 @@ long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp
|
||||
* length_found and continue as if the file server said
|
||||
* it was sending us zero octets of data.
|
||||
*/
|
||||
if (fs_fetchdata_offset_bug && first_read)
|
||||
if (fs_fetchdata_offset_bug && first_read) {
|
||||
length_found = 0;
|
||||
else
|
||||
break;
|
||||
} else if (temp <= 0) {
|
||||
code = (rx_Error(rxcallp) < 0) ? rx_Error(rxcallp) : RX_PROTOCOL_ERROR;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
first_read = 0;
|
||||
|
||||
@ -2436,11 +2440,13 @@ long cm_GetData(cm_scache_t *scp, osi_hyper_t *offsetp, char *datap, int data_le
|
||||
* length_found and continue as if the file server said
|
||||
* it was sending us zero octets of data.
|
||||
*/
|
||||
if (fs_fetchdata_offset_bug && first_read)
|
||||
if (fs_fetchdata_offset_bug && first_read) {
|
||||
length_found = 0;
|
||||
else
|
||||
break;
|
||||
} else if (temp <= 0) {
|
||||
code = (rx_Error(rxcallp) < 0) ? rx_Error(rxcallp) : RX_PROTOCOL_ERROR;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
iov = 0;
|
||||
@ -2483,11 +2489,13 @@ long cm_GetData(cm_scache_t *scp, osi_hyper_t *offsetp, char *datap, int data_le
|
||||
* length_found and continue as if the file server said
|
||||
* it was sending us zero octets of data.
|
||||
*/
|
||||
if (fs_fetchdata_offset_bug && first_read)
|
||||
if (fs_fetchdata_offset_bug && first_read) {
|
||||
length_found = 0;
|
||||
else
|
||||
break;
|
||||
} else if (temp <= 0) {
|
||||
code = (rx_Error(rxcallp) < 0) ? rx_Error(rxcallp) : RX_PROTOCOL_ERROR;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
first_read = 0;
|
||||
|
||||
@ -2726,11 +2734,13 @@ cm_VerifyStoreData(cm_bulkIO_t *biod, cm_scache_t *savedScp)
|
||||
* length_found and continue as if the file server said
|
||||
* it was sending us zero octets of data.
|
||||
*/
|
||||
if (fs_fetchdata_offset_bug && first_read)
|
||||
if (fs_fetchdata_offset_bug && first_read) {
|
||||
length_found = 0;
|
||||
else
|
||||
break;
|
||||
} else if (temp <= 0) {
|
||||
code = (rx_Error(rxcallp) < 0) ? rx_Error(rxcallp) : RX_PROTOCOL_ERROR;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
first_read = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user