From: NeilBrown Date: Fri, 13 Aug 2010 11:32:11 +0000 (+1000) Subject: roll: don't update index if block address hasn't changed. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=8fe5e3c7862aff271286e2fa4f36bb5182e725c2;p=LaFS.git roll: don't update index if block address hasn't changed. This is quite possible if the block was pushed out in the previous phase, and could save some work Signed-off-by: NeilBrown --- diff --git a/roll.c b/roll.c index e6f605b..c75b1b4 100644 --- a/roll.c +++ b/roll.c @@ -327,6 +327,9 @@ roll_block(struct fs *fs, int fsnum, int inum, int trunc, int flg, err = lafs_find_block(blk, ADOPT); if (err) break; + if (blk->b.physaddr == baddr) + /* already correctly indexed */ + break; /* FIXME do I need to dirty the inode to flush * this change into the datablock?