From c0c071600f6938bd5c8987e86b1f66399deb10c8 Mon Sep 17 00:00:00 2001 From: sage Date: Mon, 4 Sep 2006 22:51:54 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@844 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/client/Client.h | 4 ++-- ceph/osd/Ager.cc | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ceph/client/Client.h b/ceph/client/Client.h index 4a08e6d976b58..904d5680ce282 100644 --- a/ceph/client/Client.h +++ b/ceph/client/Client.h @@ -148,11 +148,11 @@ class Inode { 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) : diff --git a/ceph/osd/Ager.cc b/ceph/osd/Ager.cc index 3e1213587ba7e..e4a1506c5ba03 100644 --- a/ceph/osd/Ager.cc +++ b/ceph/osd/Ager.cc @@ -53,7 +53,8 @@ __uint64_t Ager::age_fill(float pc, utime_t until) { 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; @@ -116,7 +117,7 @@ void Ager::age_empty(float pc) { 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; @@ -250,6 +251,7 @@ void Ager::age(int time, age_empty(low_water); } //store->sync(); + //store->sync(); // show frag state store->_get_frag_stat(st); @@ -265,7 +267,7 @@ void Ager::age(int time, } // dump the freelist - save_freelist(0); + //save_freelist(0); exit(0); // hack // ok! -- 2.39.5