From: NeilBrown Date: Sun, 17 Oct 2010 23:46:18 +0000 (+1100) Subject: rollforward: user writeback during add_block_address X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=87f58a9ad3a219cf39e9a46fa13fbe07a4b689a1;p=LaFS.git rollforward: user writeback during add_block_address For consistency with other callers of lafs_add_block_address, hold writeback rather than iolock over this call. Signed-off-by: NeilBrown --- diff --git a/roll.c b/roll.c index 16e6d5e..0e6bda4 100644 --- a/roll.c +++ b/roll.c @@ -461,14 +461,14 @@ roll_block(struct fs *fs, int fsnum, int inum, int trunc, 0, fs->phase, 1); blk->b.physaddr = baddr; lafs_dirty_iblock(blk->b.parent, 0); - /* FIXME maybe set Writeback and unlock */ + 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); dprintk("Allocated block %lu to %llu\n", (unsigned long)bnum, baddr); - /* FIXME maybe clear Writeback instead */ - lafs_iounlock_block(&blk->b); + lafs_writeback_done(&blk->b); clear_bit(B_PinPending, &blk->b.flags); /* If we had previously read this block for some reason,