From: NeilBrown Date: Tue, 25 Aug 2009 07:09:54 +0000 (+1000) Subject: lafs_incorporate - don't clear a block with children. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=d946ec512cddad7d64ebe78474feb0170902547c;p=LaFS.git lafs_incorporate - don't clear a block with children. If an index block has children, then erasing it is pointless and confusing. So don't. --- diff --git a/modify.c b/modify.c index 7d0db50..8207179 100644 --- a/modify.c +++ b/modify.c @@ -1738,7 +1738,8 @@ void lafs_incorporate(struct fs *fs, struct indexblock *ib) * B_Valid so that it doesn't get written out, * but rather gets allocated as '0'. */ - if (test_bit(B_Valid, &ib->b.flags)) { + if (test_bit(B_Valid, &ib->b.flags) && + list_empty(&ib->children)) { if (ib->depth == 1 && lafs_leaf_next(ib, ib->b.fileaddr) == 0xFFFFFFFF) clear_bit(B_Valid, &ib->b.flags);