osd->store->getattrs(coll, poid, o.attrs);
if (poid.snap != CEPH_SNAPDIR && poid.snap != CEPH_NOSNAP) {
// Check snap collections
- check_snap_collections(poid, o.attrs, &o.snapcolls);
+ check_snap_collections(st.st_ino, poid, o.attrs, &o.snapcolls);
}
dout(25) << "_scan_list " << poid << dendl;
} else {
uint32_t nlinks,
ostream &out) { return false; };
virtual void check_snap_collections(
- const hobject_t &hoid,
+ ino_t hino, const hobject_t &hoid,
const map<string, bufferptr> &attrs,
set<snapid_t> *snapcolls) {};
void clear_scrub_reserved();
}
void ReplicatedPG::check_snap_collections(
+ ino_t hino,
const hobject_t &hoid,
const map<string, bufferptr> &attrs,
set<snapid_t> *snapcolls)
int r = osd->store->stat(coll_t(info.pgid, *i), hoid, &st);
if (r == -ENOENT) {
} else if (r == 0) {
- snapcolls->insert(*i);
+ if (hino == st.st_ino) {
+ snapcolls->insert(*i);
+ }
} else {
assert(0);
}
uint32_t nlinks,
ostream &out);
virtual void check_snap_collections(
- const hobject_t &hoid,
+ ino_t hino, const hobject_t &hoid,
const map<string, bufferptr> &attrs,
set<snapid_t> *snapcolls);