]> git.neil.brown.name Git - LaFS.git/commitdiff
Fix add_extent
authorNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:54 +0000 (17:09 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:54 +0000 (17:09 +1000)
We weren't updating the lastaddr/lastphys at all!!

modify.c

index c24240cb07e0b154276059fa8be77678ed18c8a0..51a24b8258d6efb31d046c84f8f52a6fea12e999 100644 (file)
--- a/modify.c
+++ b/modify.c
@@ -616,6 +616,8 @@ static int add_extent(void *data, u32 addr, u64 phys, int len)
            li->lastphys + 1 == phys) {
                /* just extend the extent */
                li->esize += len;
+               li->lastaddr = addr;
+               li->lastphys = phys;
                return len;
        }
        if (li->esize) {
@@ -636,6 +638,8 @@ static int add_extent(void *data, u32 addr, u64 phys, int len)
        li->esize = len;
        li->data = p;
        li->size -= 12;
+       li->lastaddr = addr;
+       li->lastphys = phys;
        return len;
 }