mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
osdc/ObjectCacher: clear complete on trim, release
Clear the complete flag when we are discarding buffers. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
ab56e41997
commit
94d2b91d5b
@ -841,6 +841,11 @@ void ObjectCacher::trim(loff_t max_bytes, loff_t max_ob)
|
||||
Object *ob = bh->ob;
|
||||
bh_remove(ob, bh);
|
||||
delete bh;
|
||||
|
||||
if (ob->complete) {
|
||||
ldout(cct, 10) << "trim clearing complete on " << *ob << dendl;
|
||||
ob->complete = false;
|
||||
}
|
||||
}
|
||||
|
||||
while (ob_lru.lru_get_size() > max_ob) {
|
||||
@ -1663,6 +1668,11 @@ loff_t ObjectCacher::release(Object *ob)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ob->complete) {
|
||||
ldout(cct, 10) << "release clearing complete on " << *ob << dendl;
|
||||
ob->complete = false;
|
||||
}
|
||||
|
||||
return o_unclean;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user