diff options
author | Yifan Hong <elsk@google.com> | 2019-08-27 18:37:41 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2019-09-05 15:14:34 -0700 |
commit | f35687df6e9571ae900bcd6e783549ba33abca2d (patch) | |
tree | 69d2f04484c1945ba91af2a12e774606ce0fda07 /init/service_parser.cpp | |
parent | 5576f7cc13bdec1e25ce7573deca0058d7ddb3bb (diff) |
libsnapshot: MapPartitionWithSnapshot cleanup itself if failed
When we run MapPartitionWithSnapshot, intermediate devices aren't
cleaned up if the call fails. Hence, record these intermediate devices
we have created along the way using the new AutoDevices class. Upon
failure, the AutoDevices object will be destroyed, and all the
intermediate devices will be deleted from device mapper or image
manager. Upon success, AutoDevices::Release() makes sure the
intermediate devices aren't deleted.
Test: libsnapshot_test
Change-Id: Iff4c1297528288a27765c0224b67254b68c89776
Diffstat (limited to 'init/service_parser.cpp')
0 files changed, 0 insertions, 0 deletions