void get() {
ref++;
- cout << "inode.get on " << hex << inode.ino << dec << " now " << ref << endl;
+ //cout << "inode.get on " << hex << inode.ino << dec << " now " << ref << endl;
}
void put() {
ref--; assert(ref >= 0);
- cout << "inode.put on " << hex << inode.ino << dec << " now " << ref << endl;
+ //cout << "inode.put on " << hex << inode.ino << dec << " now " << ref << endl;
}
Inode(inode_t _inode, ObjectCacher *_oc) :
struct statfs st;
store->statfs(&st);
- float a = (float)(st.f_blocks-st.f_bavail) / (float)st.f_blocks;
+ float a = 1.0 - ((float)(st.f_bavail) / (float)st.f_blocks);
+ //float a = (float)(st.f_bfree) / (float)st.f_blocks;
//dout(10) << "age_fill at " << a << " / " << pc << " .. " << st.f_blocks << " " << st.f_bavail << endl;
if (a >= pc) {
dout(2) << "age_fill at " << a << " / " << pc << " stopping" << endl;
while (1) {
struct statfs st;
store->statfs(&st);
- float a = (float)(st.f_blocks-st.f_bfree) / (float)st.f_blocks;
+ float a = 1.0 - ((float)(st.f_bavail) / (float)st.f_blocks);
dout(2) << "age_empty at " << a << " / " << pc << endl;//" stopping" << endl;
if (a <= pc) {
dout(2) << "age_empty at " << a << " / " << pc << " stopping" << endl;
age_empty(low_water);
}
//store->sync();
+ //store->sync();
// show frag state
store->_get_frag_stat(st);
}
// dump the freelist
- save_freelist(0);
+ //save_freelist(0);
exit(0); // hack
// ok!