]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: add an assert for negative entries in the scrub map
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 27 Jul 2011 19:01:38 +0000 (12:01 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 28 Jul 2011 00:42:31 +0000 (17:42 -0700)
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/osd/PG.cc

index 1aaa70ff02a5bbcf0aa7bd3877d1e30074d246c9..b161b1b5706a49585fea568c7c092d6f8528cb13 100644 (file)
@@ -2672,6 +2672,7 @@ void PG::_scan_list(ScrubMap &map, vector<sobject_t> &ls)
     if (r == 0) {
       ScrubMap::object &o = map.objects[poid];
       o.size = st.st_size;
+      assert(!o.negative);
       osd->store->getattrs(coll, poid, o.attrs);
       dout(25) << "_scan_list  " << poid << dendl;
     } else {
@@ -2876,7 +2877,7 @@ void PG::build_inc_scrub_map(ScrubMap &map, eversion_t v)
       ls.push_back(p->soid);
     } else if (p->is_delete()) {
       map.objects[p->soid];
-      map.objects[p->soid].negative = 1;
+      map.objects[p->soid].negative = true;
     }
   }