From: Sage Weil Date: Fri, 1 Sep 2017 17:36:42 +0000 (-0400) Subject: osd/PrimaryLogPG: do_osd_ops: head_exists is always true for LIST_SNAPS X-Git-Tag: v13.0.1~840^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a9145997db7a102fbdf565b06cbe44a5837c9071;p=ceph.git osd/PrimaryLogPG: do_osd_ops: head_exists is always true for LIST_SNAPS Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index bec17aaac9b2..6588da6ee8a1 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -5421,10 +5421,10 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector& ops) ssc = ctx->obc->ssc = get_snapset_context(soid, false); } assert(ssc); + dout(20) << " snapset " << ssc->snapset << dendl; int clonecount = ssc->snapset.clones.size(); - if (ssc->snapset.head_exists) - clonecount++; + clonecount++; // for head resp.clones.reserve(clonecount); for (auto clone_iter = ssc->snapset.clones.begin(); clone_iter != ssc->snapset.clones.end(); ++clone_iter) { @@ -5482,8 +5482,7 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector& ops) if (result < 0) { break; } - if (ssc->snapset.head_exists && - !ctx->obc->obs.oi.is_whiteout()) { + if (!ctx->obc->obs.oi.is_whiteout()) { assert(obs.exists); clone_info ci; ci.cloneid = CEPH_NOSNAP;