mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
Merge pull request #6017 from athanatos/wip-13150
ReplicatedPG::get_snapset_context: set exists to false for new ssc wi… Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
6f2c2aa6fa
@ -8447,7 +8447,7 @@ int ReplicatedPG::find_object_context(const hobject_t& oid,
|
||||
}
|
||||
|
||||
SnapSetContext *ssc = get_snapset_context(oid, can_create);
|
||||
if (!ssc || !(ssc->exists)) {
|
||||
if (!ssc || !(ssc->exists || can_create)) {
|
||||
dout(20) << __func__ << " " << oid << " no snapset" << dendl;
|
||||
if (pmissing)
|
||||
*pmissing = head; // start by getting the head
|
||||
@ -8695,7 +8695,6 @@ SnapSetContext *ReplicatedPG::get_snapset_context(
|
||||
if (p != snapset_contexts.end()) {
|
||||
if (can_create || p->second->exists) {
|
||||
ssc = p->second;
|
||||
ssc->exists = true;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@ -8718,6 +8717,9 @@ SnapSetContext *ReplicatedPG::get_snapset_context(
|
||||
if (bv.length()) {
|
||||
bufferlist::iterator bvp = bv.begin();
|
||||
ssc->snapset.decode(bvp);
|
||||
ssc->exists = true;
|
||||
} else {
|
||||
ssc->exists = false;
|
||||
}
|
||||
}
|
||||
assert(ssc);
|
||||
|
Loading…
Reference in New Issue
Block a user