]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not include logbl in scrub map
authorSage Weil <sage@inktank.com>
Thu, 6 Jun 2013 23:35:54 +0000 (16:35 -0700)
committerSage Weil <sage@inktank.com>
Fri, 7 Jun 2013 17:00:34 +0000 (10:00 -0700)
This is a potentially use object/file, usually prefixed by a zeroed region
on disk, that is not used by scrub at all.  It dates back to
f51348dc8bdd5071b7baaf3f0e4d2e0496618f08 (2008) and the original version of
scrub.

This *might* fix #4179.  It is not a leak per se, but I observed 1GB
scrub messages going over the write.  Maybe the allocations are causing
fragmentation, or the sub_op queues are growing.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc
src/osd/osd_types.cc
src/osd/osd_types.h

index da6a68ed387d7794eaefc707133a0eb59dfbf47d..33f89f7048e551cd595ac2dc2d5da83d8b90e84e 100644 (file)
@@ -3630,10 +3630,7 @@ int PG::build_scrub_map_chunk(
 
   // pg attrs
   osd->store->collection_getattrs(coll, map.attrs);
-
-  // log
-  osd->store->read(coll_t(), log_oid, 0, 0, map.logbl);
-  dout(10) << " done.  pg log is " << map.logbl.length() << " bytes" << dendl;
+  dout(10) << __func__ << " done." << dendl;
 
   return 0;
 }
@@ -3674,9 +3671,7 @@ void PG::build_scrub_map(ScrubMap &map, ThreadPool::TPHandle &handle)
   // pg attrs
   osd->store->collection_getattrs(coll, map.attrs);
 
-  // log
-  osd->store->read(coll_t(), log_oid, 0, 0, map.logbl);
-  dout(10) << " done.  pg log is " << map.logbl.length() << " bytes" << dendl;
+  dout(10) << __func__ << " done." << dendl;
 }
 
 
@@ -3713,9 +3708,6 @@ void PG::build_inc_scrub_map(
   _scan_list(map, ls, false, handle);
   // pg attrs
   osd->store->collection_getattrs(coll, map.attrs);
-
-  // log
-  osd->store->read(coll_t(), log_oid, 0, 0, map.logbl);
 }
 
 void PG::repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer)
index 58f08cbed5da0703e86f9d13ad461499f4a9e3d4..7873564ad559d2cc51b1c12ad9ef76e06d8ea82f 100644 (file)
@@ -2842,7 +2842,6 @@ void ScrubMap::merge_incr(const ScrubMap &l)
 {
   assert(valid_through == l.incr_since);
   attrs = l.attrs;
-  logbl = l.logbl;
   valid_through = l.valid_through;
 
   for (map<hobject_t,object>::const_iterator p = l.objects.begin();
@@ -2864,7 +2863,8 @@ void ScrubMap::encode(bufferlist& bl) const
   ENCODE_START(3, 2, bl);
   ::encode(objects, bl);
   ::encode(attrs, bl);
-  ::encode(logbl, bl);
+  bufferlist old_logbl;  // not used
+  ::encode(old_logbl, bl);
   ::encode(valid_through, bl);
   ::encode(incr_since, bl);
   ENCODE_FINISH(bl);
@@ -2875,7 +2875,8 @@ void ScrubMap::decode(bufferlist::iterator& bl, int64_t pool)
   DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, bl);
   ::decode(objects, bl);
   ::decode(attrs, bl);
-  ::decode(logbl, bl);
+  bufferlist old_logbl;   // not used
+  ::decode(old_logbl, bl);
   ::decode(valid_through, bl);
   ::decode(incr_since, bl);
   DECODE_FINISH(bl);
index c1b61d8b68ffcaa17bef12ddb4a0d622e0760837..6a6b16f3188563766afaa5488183addd2d226edd 100644 (file)
@@ -1993,7 +1993,6 @@ struct ScrubMap {
 
   map<hobject_t,object> objects;
   map<string,bufferptr> attrs;
-  bufferlist logbl;
   eversion_t valid_through;
   eversion_t incr_since;