VirtualBox

Changeset 19199 in vbox


Ignore:
Timestamp:
Apr 27, 2009 9:39:51 AM (16 years ago)
Author:
vboxsync
Message:

Storage/VBoxHDD: fix bug leading to incorrectly ignoring writes. leads to data corruption when snapshots are used and the data written is the same as of the parent image.

File:
1 edited

Legend:

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

    r19176 r19199  
    385385    if (cbPreRead)
    386386    {
    387         rc = vdReadHelper(pDisk, pImage->pPrev, uOffset - cbPreRead, pvTmp,
     387        rc = vdReadHelper(pDisk, pImage, uOffset - cbPreRead, pvTmp,
    388388                          cbPreRead);
    389389        if (RT_FAILURE(rc))
     
    420420                   (char *)pvBuf + cbThisWrite, cbWriteCopy);
    421421        if (cbReadImage)
    422             rc = vdReadHelper(pDisk, pImage->pPrev,
     422            rc = vdReadHelper(pDisk, pImage,
    423423                              uOffset + cbThisWrite + cbWriteCopy,
    424424                              (char *)pvTmp + cbPreRead + cbThisWrite + cbWriteCopy,
     
    481481    /* Read the entire data of the block so that we can compare whether it will
    482482     * be modified by the write or not. */
    483     rc = vdReadHelper(pDisk, pImage->pPrev, uOffset - cbPreRead, pvTmp,
     483    rc = vdReadHelper(pDisk, pImage, uOffset - cbPreRead, pvTmp,
    484484                      cbPreRead + cbThisWrite + cbPostRead - cbFill);
    485485    if (RT_FAILURE(rc))
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