]> git.neil.brown.name Git - LaFS.git/commitdiff
Clear physaddr when growing an index tree.
authorNeilBrown <neilb@suse.de>
Thu, 3 Sep 2009 05:28:19 +0000 (15:28 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 3 Sep 2009 05:28:19 +0000 (15:28 +1000)
The InoIdx block probably shouldn't have a phys address,
but we must be certainly it doesn't after a grow caused it to
not be an InoIdx block any more, else accounting will get
confused when we allocate it to another block.

modify.c

index dc72964eea293b524cd3712b6e181bf1177bb622..56b0eb1fab76bb01d097ff9a8e3879eb23b0057a 100644 (file)
--- a/modify.c
+++ b/modify.c
@@ -438,6 +438,9 @@ static void grow_index_tree(struct indexblock *ib, struct indexblock *new)
        ib->b.parent = new;
        getiref(new, MKREF(child));
 
+       clear_bit(B_PhysValid, &ib->b.flags);   
+       ib->b.physaddr = 0;
+
        ibuf = map_iblock(new);
        memcpy(ib->data, ibuf + offset, blksize - offset);
        memset(ib->data + blksize - offset, 0, offset);