Changeset 31619 in vbox
- Timestamp:
- Aug 12, 2010 7:01:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/ISCSIHDDCore.cpp
r31617 r31619 618 618 /** PDU we are currently transmitting. */ 619 619 PISCSIPDUTX pIScsiPDUTxCur; 620 620 /** Number of commands waiting for an answer from the target. 621 * Used for timeout handling for poll. 622 */ 623 unsigned cCmdsWaiting; 621 624 /** Table of commands waiting for a response from the target. */ 622 625 PISCSICMD aCmdsWaiting[ISCSI_CMD_WAITING_ENTRIES]; … … 751 754 pIScsiCmd->pNext = pIScsiCmdOld; 752 755 pImage->aCmdsWaiting[idx] = pIScsiCmd; 756 pImage->cCmdsWaiting++; 753 757 } 754 758 … … 780 784 Assert(!pImage->aCmdsWaiting[idx] || VALID_PTR(pImage->aCmdsWaiting[idx])); 781 785 } 782 786 pImage->cCmdsWaiting--; 783 787 } 784 788 … … 3265 3269 3266 3270 /* Wait for work or for data from the target. */ 3267 rc = iscsiIoThreadWait(pImage, RT_INDEFINITE_WAIT, pImage->fPollEvents, &fEvents); 3271 RTMSINTERVAL msWait; 3272 3273 if (pImage->cCmdsWaiting) 3274 msWait = pImage->uReadTimeout; 3275 else 3276 msWait = RT_INDEFINITE_WAIT; 3277 3278 rc = iscsiIoThreadWait(pImage, msWait, pImage->fPollEvents, &fEvents); 3268 3279 if (rc == VERR_INTERRUPTED) 3269 3280 { … … 3293 3304 pIScsiCmd = iscsiCmdGet(pImage); 3294 3305 } 3306 } 3307 else if (rc == VERR_TIMEOUT) 3308 { 3309 /* 3310 * We are waiting for a response from the target but 3311 * it didn't answered yet. 3312 * We assume the connection is broken and try to reconnect. 3313 */ 3314 LogFlow(("Timed out while waiting for an asnwer from the target, reconnecting\n")); 3315 iscsiReattach(pImage); 3295 3316 } 3296 3317 else if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.