summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2020-11-12 20:39:34 -0800
committerDavid Anderson <dvander@google.com>2020-11-12 20:41:25 -0800
commitd118cdb67cc2f0f06f96e31a20d170b8e8baf1d4 (patch)
tree88705d3e644297ff6c22f5b43a32a5764d442f9b /trusty/coverage/coverage.cpp
parentbb7c6471ec1c52f5419abe3d2b48855c9b47b6ef (diff)
libsnapshot: Get DaemonTransition test passing again.
This fixes a number of small bugs in libsnapshot. It also refactors the handler list a bit. Previously, it was a list of unique_ptrs. Now it is a list of shared_ptrs to simplify ownership. Additionally, Snapuserd is now keyed solely on the misc device name. This allows two identical snapshots to run in the same daemon, with different control names (a scenario that comes up in the DaemonTransition test). As part of this change, the two-stage initialization process has been refactored slightly. The "init" message sets all the device paths, and the "start" message needs only the misc name. Both the init and start messages now validate that no duplicate handlers exist, and that we're not overwriting any previous thread. This cleanup also fixes a bug in DmUserHandler cleanup - if a control device shut down raced with WaitForDelete(), the std::thread object would delete without a call to detach() or join(). In the new RemoveHandler(), we now correctly detach() in this scenario. This also fixes a bug where, if a COW had no partition component (it only resided on /data), the second-stage transition would fail because it used the wrong device-mapper name. Bug: N/A Test: vts_libsnapshot_test Change-Id: Ib4a281a3b5fe665c727c7077672e3c6b0b3abdba
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions