]> git.neil.brown.name Git - LaFS.git/commitdiff
Restore needed code that was removed...
authorNeil Brown <neilb@suse.de>
Wed, 25 Feb 2009 04:40:21 +0000 (15:40 +1100)
committerNeil Brown <neilb@suse.de>
Wed, 25 Feb 2009 04:40:21 +0000 (15:40 +1100)
I have no idea why this code was disabled, but it is needed,
and reduced the number of blocks that have disappeated on me by 170!

README
index.c

diff --git a/README b/README
index 3d2ea6b14c66009edffd726b83dd665ddf4e1b8f..7486249ecc391434a001d40aa7eede2b763a8002 100644 (file)
--- a/README
+++ b/README
@@ -1781,3 +1781,37 @@ FIXME when I "rm [b-z]*" it waits for writeback on something???
 24th February 2008
   "rm -r" problem from 12/dec/2008 fixed now.
   incorporate code got a make-over and is probably much better.
+
+  New problems:  After test runs, cannot create files due to no space
+     on devices!!  But directory tree is empty.
+  I can see:
+
+    free_blocks=3256 allocated=1425 max_seg=512 clean_reserved=0
+
+  The problem is that we think 1425 has been allocated to data that
+  might still need to be written, leaving not enough room for more.
+  Index Dump shows
+  ====================414 credits ==============================
+  which doesn't explain everything, but does explain a lot.  There
+  really should be nothing in the Index tree (except fs-root and
+  tree-root)
+  There is also:
+  Some inodes which are OnFree and hold no credits.
+    0 DATA (1)  52 [0]ESegRef,Claimed,PhysValid
+    52    1 (0)   0 [2564]{0,00000000}L on free Index(1),InoIdx,OnFree,PhysValid
+
+  Some other inodes which are pinned with lots of credits and are
+    on the phase_leaf list
+    0 DATA (1) 299 [0]ESegRef,C,CI,Claimed,PhysValid
+   299    1 (1)   0 [0]{0,00000000} [0, 0]L Leaf1(40) Index(1),Pinned,Phase1,InoIdx,Valid,SegRef,C,CI,CN,CNI,PhysValid,Prealloc
+
+  And that is about it.  some are not Valid, some are...
+  checkpoint just wants to 'flip' them.
+  They mostly have a refcnt of 1... I wonder who is holding that....
+  The reference of on the dblock is held by the iblock.
+  But what is the iblock remaining?  Who holds that reference?
+
+  I restored some code to clean iblock, and now:
+  free_blocks=3229 allocated=1277 max_seg=512 clean_reserved=0
+  ====================244 credits ==============================
+  which saved 130 credits.  That helps.
diff --git a/index.c b/index.c
index bab26db72226dbe596fa6a7267a3ad0df559d410..bf302fdf623aba4b41cfe2125b17c91c0c21d863 100644 (file)
--- a/index.c
+++ b/index.c
@@ -785,7 +785,7 @@ void lafs_refile(struct block *b, int dec)
                                b->parent = NULL;
                                spin_lock(&b->inode->i_mapping->private_lock);
                                list_del_init(&b->siblings);
-                               if (test_bit(B_InoIdx, &b->flags) && 0 &&
+                               if (test_bit(B_InoIdx, &b->flags) &&
                                    !test_bit(B_Root, &b->flags) &&
                                    LAFSI(b->inode)->iblock == iblk(b)) {
                                        LAFSI(b->inode)->iblock = NULL;