From: NeilBrown Date: Fri, 4 Mar 2011 23:44:23 +0000 (+1100) Subject: fix a BUG assertion in lafs_dirty_iblock. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=bfd2c2c5d47dcc24376b80623dd32db268c7ddb6;p=LaFS.git fix a BUG assertion in lafs_dirty_iblock. The InoIdx block for an inode with depth==0 is not Valid, as it contains no index information. However it still can be appropriate to mark it dirty when a data block is allocated, to ensure incorporation happens correctly. So it is not a bug to dirty a non-Valid iblock - at least if the depth is 0. Signed-off-by: NeilBrown --- diff --git a/block.c b/block.c index 85758cf..622ebcd 100644 --- a/block.c +++ b/block.c @@ -655,7 +655,7 @@ lafs_dirty_iblock(struct indexblock *b, int want_realloc) */ LAFS_BUG(!test_bit(B_Pinned, &b->b.flags), &b->b); - LAFS_BUG(!test_bit(B_Valid, &b->b.flags), &b->b); + LAFS_BUG(!test_bit(B_Valid, &b->b.flags) && b->depth > 0, &b->b); if (want_realloc) { /* Try to make for Realloc instead. If we cannot get the