Added possibility to disable cleaner thread.

In case of cleaner thread retrived 'OCF_CLEANER_DISABLE' no cleaning is
performed until kick is called.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-04-29 09:51:51 -04:00
parent 64a79086a8
commit 095ccc51fe
4 changed files with 33 additions and 3 deletions

View File

@@ -271,6 +271,11 @@ static int _cas_ctx_cleaner_init(ocf_cleaner_t c)
return cas_create_cleaner_thread(c);
}
static void _cas_ctx_cleaner_kick(ocf_cleaner_t c)
{
return cas_kick_cleaner_thread(c);
}
static void _cas_ctx_cleaner_stop(ocf_cleaner_t c)
{
return cas_stop_cleaner_thread(c);
@@ -364,6 +369,7 @@ static const struct ocf_ctx_config ctx_cfg = {
.cleaner = {
.init = _cas_ctx_cleaner_init,
.kick = _cas_ctx_cleaner_kick,
.stop = _cas_ctx_cleaner_stop,
},