summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2020-10-30 00:00:33 -0700
committerDavid Anderson <dvander@google.com>2020-11-02 13:24:06 -0800
commit6d8e5e076c2303b0f6f020dc8cd6676a7fb49e9e (patch)
tree0ff3b1a2f7ff148211d89aba115feb3b496c8188 /trusty/coverage/coverage.cpp
parent5da06556cac4156d48e02d1d23529b6d36078aa0 (diff)
Start snapuserd if needed as soon as possible during second-stage init.
snapuserd is used as a user-space block device implementation during Virtual A/B Compression-enabled updates. It has to be started in first-stage init, so that updated partitions can be mounted. Once init reaches second-stage, and sepolicy is loaded, we want to re-launch snapuserd at the correct privilege level. We accomplish this by rebuilding the device-mapper tables of each block device, which allows us to re-bind the kernel driver to a new instance of snapuserd. After this, the old daemon can be shut down. Ideally this transition happens as soon as possible, before any .rc scripts are run. This minimizes the amount of time the original snapuserd is running, as well as any ambiguity about which instance of snapuserd is the correct one. The original daemon is sent a SIGTERM signal once the transition is complete. The pid is stored in an environment variable to make this possible (these details are implemented in libsnapshot). Bug: 168259959 Test: manual test Change-Id: Ife9518e502ce02f11ec54e7f3e6adc6f04d94133
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions