]> git.neil.brown.name Git - LaFS.git/commitdiff
Improve tracing for lafs_incorporate.
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)
Show the uninc list as well, and do it before trying to
incorporate.

modify.c

index 687b62e96a98cd1f8261f54c9004953e0ccd69fd..7d0db50869eafc72d76602339bd9d7cf5c5b0b42 100644 (file)
--- a/modify.c
+++ b/modify.c
@@ -1616,6 +1616,18 @@ void lafs_incorporate(struct fs *fs, struct indexblock *ib)
                } else
                        offset = 0;
 
+               dprintk("Index contains:\n");
+               if (lafs_trace) {
+                       struct block *b;
+
+                       print_index(buf, ib->b.fileaddr, blocksize - offset);
+                       printk("uninc list:\n");
+                       for (b = uninc; b ; b=b->chain)
+                               printk("  %lu: %llu\n", 
+                                      (unsigned long) b->fileaddr,
+                                      (unsigned long long) b->physaddr);
+               }
+
                /* internal index block.  Might be able to merge in-place */
                if (*(u16 *)(buf) == cpu_to_le16(IBLK_INDEX) &&
                    (cred = incorporate_index(uninc, buf+2,
@@ -1624,12 +1636,6 @@ void lafs_incorporate(struct fs *fs, struct indexblock *ib)
                        uit.credits = cred;
                        goto out;
                }
-
-               dprintk("Index contains:\n");
-               if (lafs_trace)
-                       print_index(buf, ib->b.fileaddr, blocksize - offset);
-               /* FIXME trace the contents of the uninc list */
-
                unmap_iblock(ib, buf-offset);
 
        }