<< " parent completion " << m_parent_completion
<< " extents " << image_extents
<< dendl;
- aio_read(m_ictx->parent, image_extents, NULL, &m_read_data,
- m_parent_completion, 0);
+ int r = aio_read(m_ictx->parent, image_extents, NULL, &m_read_data,
+ m_parent_completion, 0);
+ if (r < 0) {
+ lderr(m_ictx->cct) << "read_from_parent " << this
+ << ": error reading from parent: "
+ << cpp_strerror(r) << dendl;
+ m_parent_completion->release();
+ complete(r);
+ }
}
static inline bool is_copy_on_read(ImageCtx *ictx, librados::snap_t snap_id) {
int r = aio_read(m_ictx->parent, m_image_extents, NULL, &m_copyup_data,
comp, 0);
if (r < 0) {
+ lderr(m_ictx->cct) << __func__ << " " << this
+ << ": error reading from parent: "
+ << cpp_strerror(r) << dendl;
comp->release();
-
- remove_from_list();
- complete_requests(r);
+ complete(r);
}
}