old_format(false),
order(0), size(0), features(0),
format_string(NULL),
- id(image_id), parent(NULL),
+ id(image_id),
stripe_unit(0), stripe_count(0), flags(0),
readahead(),
total_bytes_read(0),
ImageCtx::~ImageCtx() {
ldout(cct, 10) << this << " " << __func__ << dendl;
+ ceph_assert(parent == nullptr);
ceph_assert(config_watcher == nullptr);
ceph_assert(image_watcher == NULL);
ceph_assert(exclusive_lock == NULL);
std::string header_oid;
std::string id; // only used for new-format images
ParentImageInfo parent_md;
- ImageCtx *parent;
+ ImageCtx *parent = nullptr;
ImageCtx *child = nullptr;
MigrationInfo migration_info;
cls::rbd::GroupSpec group_spec;
const MigrationInfo &migration_info, Context *on_finish)
: m_child_image_ctx(child_image_ctx), m_parent_md(parent_md),
m_migration_info(migration_info), m_on_finish(on_finish),
- m_parent_image_ctx(nullptr), m_parent_snap_id(CEPH_NOSNAP),
- m_error_result(0) {
+ m_parent_snap_id(CEPH_NOSNAP), m_error_result(0) {
}
template <typename I>
MigrationInfo m_migration_info;
Context *m_on_finish;
- ImageCtxT *m_parent_image_ctx;
+ ImageCtxT *m_parent_image_ctx = nullptr;
uint64_t m_parent_snap_id;
int m_error_result;