aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-08-29 14:06:00 -0400
committerJosef Bacik <josef@redhat.com>2011-10-19 15:12:41 -0400
commit300e4f8a56f263797568c95b71c949f9f02e4534 (patch)
treeecb4f4ba0cd499f73876476f92c3fc6306aaa140 /fs/btrfs/disk-io.c
parent4a33854257764c2ec6337ee0c8ecafb64f8e29e1 (diff)
Btrfs: put the block group cache after we commit the super
In moving some enospc stuff around I noticed that when we unmount we are often evicting the free space cache inodes before we do our last commit. This isn't bad, but it makes us constantly have to re-read the inodes back. So instead don't evict the cache until after we do our last commit, this will make things a little less crappy and makes a future enospc change work properly. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0b5643a68d57..4965a0179b31 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2543,8 +2543,6 @@ int close_ctree(struct btrfs_root *root)
2543 /* clear out the rbtree of defraggable inodes */ 2543 /* clear out the rbtree of defraggable inodes */
2544 btrfs_run_defrag_inodes(root->fs_info); 2544 btrfs_run_defrag_inodes(root->fs_info);
2545 2545
2546 btrfs_put_block_group_cache(fs_info);
2547
2548 /* 2546 /*
2549 * Here come 2 situations when btrfs is broken to flip readonly: 2547 * Here come 2 situations when btrfs is broken to flip readonly:
2550 * 2548 *
@@ -2570,6 +2568,8 @@ int close_ctree(struct btrfs_root *root)
2570 printk(KERN_ERR "btrfs: commit super ret %d\n", ret); 2568 printk(KERN_ERR "btrfs: commit super ret %d\n", ret);
2571 } 2569 }
2572 2570
2571 btrfs_put_block_group_cache(fs_info);
2572
2573 kthread_stop(root->fs_info->transaction_kthread); 2573 kthread_stop(root->fs_info->transaction_kthread);
2574 kthread_stop(root->fs_info->cleaner_kthread); 2574 kthread_stop(root->fs_info->cleaner_kthread);
2575 2575