std::vector<librbd::linked_image_spec_t> *images) {
ImageCtx *ictx = new librbd::ImageCtx("", image_id, nullptr,
io_ctx, true);
+ CephContext *cct = ictx->cct;
int r = ictx->state->open(OPEN_FLAG_SKIP_OPEN_PARENT);
if (r < 0) {
if (r == -ENOENT) {
return 0;
}
- lderr(ictx->cct) << "failed to open descendant " << image_id
+ lderr(cct) << "failed to open descendant " << image_id
<< " from pool " << io_ctx.get_pool_name() << ":"
<< cpp_strerror(r) << dendl;
return r;
int r1 = ictx->state->close();
if (r1 < 0) {
- lderr(ictx->cct) << "error when closing descendant " << image_id
+ lderr(cct) << "error when closing descendant " << image_id
<< " from pool " << io_ctx.get_pool_name() << ":"
<< cpp_strerror(r) << dendl;
}