When we are backfilling, we add in objects as we push them. Do not count
the snapdir object as a clone, or else we'll screw up the count.
Fixes: #2080
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
dout(10) << "add_object_context_to_pg_stat " << oi.soid << dendl;
object_stat_sum_t stat;
+ stat.num_bytes += oi.size;
+
if (oi.soid.snap != CEPH_SNAPDIR)
stat.num_objects++;
- stat.num_bytes += oi.size;
-
- if (oi.soid.snap && oi.soid.snap != CEPH_NOSNAP) {
+ if (oi.soid.snap && oi.soid.snap != CEPH_NOSNAP && oi.soid.snap != CEPH_SNAPDIR) {
stat.num_object_clones++;
if (!obc->ssc)