Commit 69cc5b58 authored by Daniel Jordan's avatar Daniel Jordan Committed by Xie XiuQi
Browse files

ktask: add undo support



hulk inclusion
category: feature
bugzilla: 13228
CVE: NA
---------------------------

Tasks can fail midway through their work.  To recover, the finished
chunks of work need to be undone in a task-specific way.

Allow ktask clients to pass an "undo" callback that is responsible for
undoing one chunk of work.  To avoid multiple levels of error handling,
do not allow the callback to fail.  For simplicity and because it's a
slow path, undoing is not multithreaded.

Signed-off-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: default avatarHongbo Yao <yaohongbo@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Tested-by: default avatarHongbo Yao <yaohongbo@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent c48676ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment