From: NeilBrown Date: Fri, 13 Aug 2010 03:59:10 +0000 (+1000) Subject: Set PinPending in flush_data_to_inode. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=a7fcdc0a714ff801d743bbbbe2968f04c56f3751;p=LaFS.git Set PinPending in flush_data_to_inode. Should always have this set when we pin a block. It keeps the block pinned until it is dirtied. As lafs_pin_block does a refile at the end, it can drop the Pinned state as soon as it is set. Signed-off-by: NeilBrown --- diff --git a/cluster.c b/cluster.c index 2674628..cfd70ea 100644 --- a/cluster.c +++ b/cluster.c @@ -517,6 +517,7 @@ static int flush_data_to_inode(struct block *b) credits--; lafs_space_return(fs, credits); /* FIXME do I need to get a SegRef ?? */ + set_bit(B_PinPending, &lai->dblock->b.flags); if (test_bit(B_Pinned, &b->flags)) lafs_pin_block_ph(&lai->dblock->b, !!test_bit(B_Phase1, &b->flags)); else