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:
Sage Weil 2012-10-24 14:36:05 -07:00
parent ab56e41997
commit 94d2b91d5b

View File

@ -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;
}