This will avoid silently failing to load a specified plugin.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
plugin_registry->get_with_load("librbd", "librbd_" + token));
if (plugin == nullptr) {
lderr(cct) << "failed to load plugin: " << token << dendl;
- ctx->complete(-ENOENT);
+ ctx->complete(-ENOSYS);
break;
}
if (*result < 0) {
lderr(cct) << "failed to initialize plugin registry: "
<< cpp_strerror(*result) << dendl;
+ send_close_image(*result);
+ return nullptr;
}
return send_init_cache(result);