]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 4 Sep 2006 22:51:54 +0000 (22:51 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Mon, 4 Sep 2006 22:51:54 +0000 (22:51 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@844 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/client/Client.h
ceph/osd/Ager.cc

index 4a08e6d976b580cf1bc991c225acc839381438f2..904d5680ce2828339c6797c344796a5e9d41496f 100644 (file)
@@ -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) : 
index 3e1213587ba7eac0eade380aaa22a1e7a6efc237..e4a1506c5ba034073f9aa45bd9a6e0ef3800e0a7 100644 (file)
@@ -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!