fs_mgr/libsnapshot/utility.cpp
0 → 100644
+56
−0
fs_mgr/libsnapshot/utility.h
0 → 100644
+85
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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