If the asok registration fails (perhaps due to a race condition with
a deleted and recreated image of the same name), periodically attempt
to register the missing asok hook.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
2d2d3bbc791e807bb0c83072aaeee023116884ce)
{
Mutex::Locker locker(m_lock);
auto name = m_local_ioctx->get_pool_name() + "/" + m_local_image_name;
- if (m_name == name) {
+ if (m_asok_hook != nullptr && m_name == name) {
return;
}
m_name = name;