Otherwise, if we do a proxy_write and don't promote it, the ssc will
stick around with exists = true and cause future reads on snaps for the
object to fail to fall through to the base tier.
Fixes: #13150
Signed-off-by: Samuel Just <sjust@redhat.com>
}
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
if (p != snapset_contexts.end()) {
if (can_create || p->second->exists) {
ssc = p->second;
- ssc->exists = true;
} else {
return NULL;
}
if (bv.length()) {
bufferlist::iterator bvp = bv.begin();
ssc->snapset.decode(bvp);
+ ssc->exists = true;
+ } else {
+ ssc->exists = false;
}
}
assert(ssc);