]> git.neil.brown.name Git - LaFS.git/commitdiff
rollforward: don't get upset about lafs_add_block_address returning 0.
authorNeilBrown <neilb@suse.de>
Sun, 17 Oct 2010 23:49:58 +0000 (10:49 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 18 Oct 2010 01:28:28 +0000 (12:28 +1100)
This is (now) quite acceptable, we simply retry.

Signed-off-by: NeilBrown <neilb@suse.de>
roll.c

diff --git a/roll.c b/roll.c
index 0e6bda473abbbd699ada7012d5c8830c104b3827..5b741ee38d780072e4a05fe5c137a1b24c24c2ff 100644 (file)
--- a/roll.c
+++ b/roll.c
@@ -463,9 +463,13 @@ roll_block(struct fs *fs, int fsnum, int inum, int trunc,
                lafs_dirty_iblock(blk->b.parent, 0);
                set_bit(B_Writeback, &blk->b.flags);
                lafs_iounlock_block(&blk->b);
-               if (lafs_add_block_address(fs, &blk->b) == 0)
-                       /* FIXME if the table becomes full, we have a problem... */
-                       LAFS_BUG(1, &blk->b);
+
+               while (lafs_add_block_address(fs, &blk->b) == 0)
+                       /* Just like in lafs_phase_flip, there is no special
+                        * action required here.
+                        */
+                       ;
+
                dprintk("Allocated block %lu to %llu\n",
                        (unsigned long)bnum, baddr);
                lafs_writeback_done(&blk->b);