VirtualBox

Changeset 471 in vbox


Ignore:
Timestamp:
Jan 31, 2007 4:29:49 PM (18 years ago)
Author:
vboxsync
Message:

Suspend the VM if an iSCSI target is down.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r433 r471  
    13521352
    13531353
    1354 static void ataDiskFull(PPDMDEVINS pDevIns)
     1354static void ataWarningDiskFull(PPDMDEVINS pDevIns)
    13551355{
    13561356    int rc;
     
    13631363
    13641364
     1365static void ataWarningISCSI(PPDMDEVINS pDevIns)
     1366{
     1367    int rc;
     1368    LogRel(("PIIX3 ATA: iSCSI target unavailable\n"));
     1369    rc = VMSetRuntimeError(PDMDevHlpGetVM(pDevIns),
     1370                           false, "DevATA_ISCSIDOWN",
     1371                           N_("The iSCSI target has stopped responding. VM execution is suspended. You can resume when it is available again"));
     1372    AssertRC(rc);
     1373}
     1374
     1375
    13651376static bool ataReadSectorsSS(ATADevState *s)
    13661377{
     
    13851396        if (rc == VERR_DISK_FULL)
    13861397        {
    1387             ataDiskFull(ATADEVSTATE_2_DEVINS(s));
     1398            ataWarningDiskFull(ATADEVSTATE_2_DEVINS(s));
     1399            return true;
     1400        }
     1401        if (rc == VERR_BROKEN_PIPE || rc == VERR_NET_CONNECTION_REFUSED)
     1402        {
     1403            /* iSCSI connection abort (first error) or failure to reestablish
     1404             * connection (second error). Pause VM. On resume we'll retry. */
     1405            ataWarningISCSI(ATADEVSTATE_2_DEVINS(s));
    13881406            return true;
    13891407        }
     
    14201438        if (rc == VERR_DISK_FULL)
    14211439        {
    1422             ataDiskFull(ATADEVSTATE_2_DEVINS(s));
     1440            ataWarningDiskFull(ATADEVSTATE_2_DEVINS(s));
     1441            return true;
     1442        }
     1443        if (rc == VERR_BROKEN_PIPE || rc == VERR_NET_CONNECTION_REFUSED)
     1444        {
     1445            /* iSCSI connection abort (first error) or failure to reestablish
     1446             * connection (second error). Pause VM. On resume we'll retry. */
     1447            ataWarningISCSI(ATADEVSTATE_2_DEVINS(s));
    14231448            return true;
    14241449        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette