@@ -130,7 +130,7 @@ ECBackend::ECBackend(
130130 : PGBackend(cct, pg, store, coll, ch),
131131 read_pipeline(cct, ec_impl, this ->sinfo, get_parent()->get_eclistener()),
132132 rmw_pipeline(cct, ec_impl, this ->sinfo, get_parent()->get_eclistener(), *this),
133- recovery_backend(cct, coll, ec_impl, this ->sinfo, read_pipeline, unstable_hashinfo_registry, get_parent()),
133+ recovery_backend(cct, coll, ec_impl, this ->sinfo, read_pipeline, unstable_hashinfo_registry, get_parent(), this ),
134134 ec_impl(ec_impl),
135135 sinfo(ec_impl->get_data_chunk_count (), stripe_width),
136136 unstable_hashinfo_registry(cct, ec_impl) {
@@ -150,14 +150,16 @@ ECBackend::RecoveryBackend::RecoveryBackend(
150150 const ECUtil::stripe_info_t & sinfo,
151151 ReadPipeline& read_pipeline,
152152 UnstableHashInfoRegistry& unstable_hashinfo_registry,
153- ECListener* parent)
153+ ECListener* parent,
154+ ECBackend* ecbackend)
154155 : cct(cct),
155156 coll(coll),
156157 ec_impl(std::move(ec_impl)),
157158 sinfo(sinfo),
158159 read_pipeline(read_pipeline),
159160 unstable_hashinfo_registry(unstable_hashinfo_registry),
160- parent(parent) {
161+ parent(parent),
162+ ecbackend(ecbackend) {
161163}
162164
163165PGBackend::RecoveryHandle *ECBackend::RecoveryBackend::open_recovery_op ()
@@ -575,8 +577,12 @@ void ECBackend::RecoveryBackend::continue_recovery_op(
575577 uint64_t amount = get_recovery_chunk_size ();
576578
577579 if (op.recovery_progress .first && op.obc ) {
578- /* We've got the attrs and the hinfo, might as well use them */
579- op.hinfo = unstable_hashinfo_registry.get_hash_info (op.hoid , false , op.obc ->attr_cache , op.obc ->obs .oi .size );
580+ if (auto [r, attrs, size] = ecbackend->get_attrs_n_size_from_disk (op.hoid );
581+ r >= 0 || r == -ENOENT) {
582+ op.hinfo = unstable_hashinfo_registry.get_hash_info (op.hoid , false , attrs, size);
583+ } else {
584+ derr << __func__ << " : can't stat-or-getattr on " << op.hoid << dendl;
585+ }
580586 if (!op.hinfo ) {
581587 derr << __func__ << " : " << op.hoid << " has inconsistent hinfo"
582588 << dendl;
0 commit comments