VirtualBox

Changeset 14910 in vbox


Ignore:
Timestamp:
Dec 2, 2008 3:14:24 PM (16 years ago)
Author:
vboxsync
Message:

Storage/VHD: comment change, documenting why the current code works for diff images. Tiny cleanup to be on the safe side, signalling that no extra data is needed.

File:
1 edited

Legend:

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

    r14852 r14910  
    10211021        /*
    10221022         * If the block is not allocated the content of the entry is ~0
    1023          * and we need to allocate a new block.
     1023         * and we need to allocate a new block. Note that while blocks are
     1024         * allocated with a relatively big granularity, each sector has its
     1025         * own bitmap entry, indicating whether it has been written or not.
     1026         * So that means for the purposes of the higher level that the
     1027         * granularity is invisible.
    10241028         */
    1025         /** @todo Integrate this properly into the unallocated block logic.
    1026          * The current code wouldn't be able to handle diff images at all. */
    10271029        if (pImage->pBlockAllocationTable[cBlockAllocationTableEntry] == ~0U)
    10281030        {
     
    10871089    if (pcbWriteProcess)
    10881090        *pcbWriteProcess = cbToWrite;
     1091
     1092    /* Stay on the safe side. Do not run the risk of confusing the higher
     1093     * level, as that can be pretty lethal to image consistency. */
     1094    *pcbPreRead = 0;
     1095    *pcbPostRead = 0;
    10891096
    10901097    return 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