diff options
author | Sage Weil <sage@inktank.com> | 2013-06-06 16:35:54 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-07 17:15:13 -0700 |
commit | 32b2f11366418f9a0cc0659be22cf15fbafbe3b1 (patch) | |
tree | f83944f45ad8d7b95fac690f4e27548846c44913 | |
parent | 5047a4ff16f556ec25b6624fe8f1a07e3ec5f864 (diff) | |
download | ceph-32b2f11366418f9a0cc0659be22cf15fbafbe3b1.tar.gz |
osd: do not include logbl in scrub map
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>
(cherry picked from commit 0b036ecddbfd82e651666326d6f16b3c000ade18)
-rw-r--r-- | src/osd/PG.cc | 12 | ||||
-rw-r--r-- | src/osd/osd_types.cc | 7 | ||||
-rw-r--r-- | src/osd/osd_types.h | 1 |
3 files changed, 6 insertions, 14 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 47c85c62a3b..de018690e98 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3406,10 +3406,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; } @@ -3449,9 +3446,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; } @@ -3488,9 +3483,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) diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 91dd6914e3e..f1d3806c03f 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -2717,7 +2717,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(); @@ -2739,7 +2738,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); @@ -2750,7 +2750,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); diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index fa9070a27e5..d2841308e00 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -1852,7 +1852,6 @@ struct ScrubMap { map<hobject_t,object> objects; map<string,bufferptr> attrs; - bufferlist logbl; eversion_t valid_through; eversion_t incr_since; |