]> git.neil.brown.name Git - LaFS.git/commitdiff
Set PinPending in flush_data_to_inode.
authorNeilBrown <neilb@suse.de>
Fri, 13 Aug 2010 03:59:10 +0000 (13:59 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 13 Aug 2010 03:59:10 +0000 (13:59 +1000)
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 <neilb@suse.de>
cluster.c

index 2674628cfc95c4d04cd10037dd06709be32ee24e..cfd70ea9ef2dda36efcba949a4cc9c2f4003a570 100644 (file)
--- 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