VirtualBox

Changeset 22625 in vbox


Ignore:
Timestamp:
Aug 31, 2009 5:42:43 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51692
Message:

Main: lock media correctly after creating an online snapshot (previously the new diff image was not locked for writing if the machine was running)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r22624 r22625  
    61766176                                              &aProgress);
    61776177
     6178            // at this point, the old image is still locked for writing, but instead
     6179            // we need the new diff image locked for writing and lock the previously
     6180            // current one for reading only
     6181            if (aOnline)
     6182            {
     6183                diff->LockWrite(NULL);
     6184                mData->mSession.mLockedMedia.push_back(Data::Session::LockedMedia::value_type(ComPtr<IHardDisk>(diff), true));
     6185                hd->UnlockWrite(NULL);
     6186                hd->LockRead(NULL);
     6187                mData->mSession.mLockedMedia.push_back(Data::Session::LockedMedia::value_type(ComPtr<IHardDisk>(hd), false));
     6188            }
     6189
    61786190            alock.enter();
    61796191
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