diff options
author | Josh Durgin <josh.durgin@inktank.com> | 2014-02-11 19:35:14 +0100 |
---|---|---|
committer | Josh Durgin <josh.durgin@inktank.com> | 2014-02-11 21:06:10 +0100 |
commit | bf8cf2d6d21a204a099347f3dcd5b48100b8c445 (patch) | |
tree | 93079dd7aee87885afc52b4a0e7099afec76da01 /src/osdc | |
parent | Merge pull request #1209 from fghaas/master (diff) | |
download | ceph-bf8cf2d6d21a204a099347f3dcd5b48100b8c445.tar.xz ceph-bf8cf2d6d21a204a099347f3dcd5b48100b8c445.zip |
ObjectCacher: remove max_bytes and max_ob arguments to trim()
These are never passed, so replace them with the defaults.
Backport: emperor, dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'src/osdc')
-rw-r--r-- | src/osdc/ObjectCacher.cc | 19 | ||||
-rw-r--r-- | src/osdc/ObjectCacher.h | 2 |
2 files changed, 8 insertions, 13 deletions
diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 6160d7005f1..7273a3d0767 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -946,19 +946,14 @@ void ObjectCacher::flush(loff_t amount) } -void ObjectCacher::trim(loff_t max_bytes, loff_t max_ob) +void ObjectCacher::trim() { assert(lock.is_locked()); - if (max_bytes < 0) - max_bytes = max_size; - if (max_ob < 0) - max_ob = max_objects; - - ldout(cct, 10) << "trim start: bytes: max " << max_bytes << " clean " << get_stat_clean() - << ", objects: max " << max_ob << " current " << ob_lru.lru_get_size() + ldout(cct, 10) << "trim start: bytes: max " << max_size << " clean " << get_stat_clean() + << ", objects: max " << max_objects << " current " << ob_lru.lru_get_size() << dendl; - while (get_stat_clean() > max_bytes) { + while (get_stat_clean() > max_size) { BufferHead *bh = static_cast<BufferHead*>(bh_lru_rest.lru_expire()); if (!bh) break; @@ -976,7 +971,7 @@ void ObjectCacher::trim(loff_t max_bytes, loff_t max_ob) } } - while (ob_lru.lru_get_size() > max_ob) { + while (ob_lru.lru_get_size() > max_objects) { Object *ob = static_cast<Object*>(ob_lru.lru_expire()); if (!ob) break; @@ -985,8 +980,8 @@ void ObjectCacher::trim(loff_t max_bytes, loff_t max_ob) close_object(ob); } - ldout(cct, 10) << "trim finish: max " << max_bytes << " clean " << get_stat_clean() - << ", objects: max " << max_ob << " current " << ob_lru.lru_get_size() + ldout(cct, 10) << "trim finish: max " << max_size << " clean " << get_stat_clean() + << ", objects: max " << max_objects << " current " << ob_lru.lru_get_size() << dendl; } diff --git a/src/osdc/ObjectCacher.h b/src/osdc/ObjectCacher.h index d7ba9d8a50b..aacafded6bf 100644 --- a/src/osdc/ObjectCacher.h +++ b/src/osdc/ObjectCacher.h @@ -434,7 +434,7 @@ class ObjectCacher { void bh_read(BufferHead *bh); void bh_write(BufferHead *bh); - void trim(loff_t max_bytes=-1, loff_t max_objects=-1); + void trim(); void flush(loff_t amount=0); /** |