]> git.neil.brown.name Git - LaFS.git/commitdiff
Updates summaries when flushing a block into the inode.
authorNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:51 +0000 (17:09 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 25 Aug 2009 07:09:51 +0000 (17:09 +1000)
If the block previously had a real address, we need to
release that address for reuse.

cluster.c

index f7f9accdb4b052fe5de2e8b188106b268848624f..9388f4e849f8073af1eeb8259bc8811d2373a0e9 100644 (file)
--- a/cluster.c
+++ b/cluster.c
@@ -554,6 +554,10 @@ unsigned long long lafs_cluster_allocate(struct block *b, int cnum)
            size + lai->metadata_size <= sb->s_blocksize) {
                int success = flush_data_to_inode(b);
                if (success) {
+                       lafs_summary_update(fs, b->inode, b->physaddr, 0,
+                                           0, !!test_bit(B_Phase1, &b->flags),
+                                           test_bit(B_SegRef, &b->flags));
+                       b->physaddr = 0;
                        lafs_iounlock_block(b);
                        return 0;
                }