ANDROID: dm-user: Fail the IO if there is no daemon
IO processing is done by the daemon when bio requests
are queued in dm-user. If there is no daemon, then
IO's will be hung indefinitely; This can lead
to sysrq kernel panic when llkd daemon detects
IO's hung in uninterruptible state.
Terminate the bio reqests as an IO error if there
is no daemon to process. We already track if
there are any user-space threads processing
IO's per dm-user targer. If there is no daemon,
queue the IO requests to a delayed work queue.
If the daemon does not show up within that time frame,
worker thread will fail the IO with an IO error.
Bug: 188362117
Test: 1: Kill the daemon when IO to dm-user is in-flight
Verify IO failure and no IO hang.
2: Verify daemon picks up IO's queued for cancelling.
3: Full and incremental OTA.
4: Terminate snapuserd daemon during post-install phase of OTA
5: Add user-space unit test to test (1)
Signed-off-by:
Akilesh Kailash <akailash@google.com>
Change-Id: I9351e8f664edc67d75c4ea10a065928ef85e5490
Loading