From: NeilBrown Date: Sun, 17 Oct 2010 23:49:58 +0000 (+1100) Subject: rollforward: don't get upset about lafs_add_block_address returning 0. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=ddd8a48f4b42eb9242376a0d1b0f500b493f2de2;p=LaFS.git rollforward: don't get upset about lafs_add_block_address returning 0. This is (now) quite acceptable, we simply retry. Signed-off-by: NeilBrown --- diff --git a/roll.c b/roll.c index 0e6bda4..5b741ee 100644 --- 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);