VirtualBox

Changeset 36151 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Mar 3, 2011 2:42:53 PM (14 years ago)
Author:
vboxsync
Message:

BlockCache: Don't add waiting writs to the list again after an I/O error, this can cause hangs during suspend. It is safe to write the data and complete the entries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMBlkCache.cpp

    r35346 r36151  
    24732473            }
    24742474
    2475             /*
    2476              * The entry is still marked as dirty which prevents eviction.
    2477              * Add the waiters to the list again.
    2478              */
    2479             pEntry->fFlags &= ~PDMBLKCACHE_ENTRY_IS_DIRTY; /* Clear so it gets added to the list again. */
     2475            /* Mark the entry as dirty again to get it added to the list later on. */
    24802476            fDirty = true;
    2481 
    2482             if (pComplete)
    2483             {
    2484                 pEntry->pWaitingHead = pComplete;
    2485                 while (pComplete->pNext)
    2486                     pComplete = pComplete->pNext;
    2487                 pEntry->pWaitingTail = pComplete;
    2488                 pComplete = NULL;
    2489             }
    2490         }
    2491         else
    2492         {
    2493             pEntry->fFlags &= ~PDMBLKCACHE_ENTRY_IS_DIRTY;
    2494 
    2495             while (pCurr)
    2496             {
    2497                 AssertMsg(pCurr->fWrite, ("Completed write entries should never have read tasks attached\n"));
    2498 
    2499                 RTSgBufCopyToBuf(&pCurr->SgBuf, pEntry->pbData + pCurr->offCacheEntry, pCurr->cbTransfer);
    2500                 fDirty = true;
    2501 
    2502                 pCurr = pCurr->pNext;
    2503             }
     2477        }
     2478
     2479        pEntry->fFlags &= ~PDMBLKCACHE_ENTRY_IS_DIRTY;
     2480
     2481        while (pCurr)
     2482        {
     2483            AssertMsg(pCurr->fWrite, ("Completed write entries should never have read tasks attached\n"));
     2484
     2485            RTSgBufCopyToBuf(&pCurr->SgBuf, pEntry->pbData + pCurr->offCacheEntry, pCurr->cbTransfer);
     2486            fDirty = true;
     2487            pCurr = pCurr->pNext;
    25042488        }
    25052489    }
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