diff options
author | David Sterba <dsterba@suse.cz> | 2011-04-13 09:41:04 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-11-06 03:04:01 -0500 |
commit | 6c41761fc6efe1503103a1afe03a6635c0b5d4ec (patch) | |
tree | 08ad34d43aac48e8f8143a0b1fa07141df8f202a /fs/btrfs/tree-log.c | |
parent | c8174313a8102e874aaa321e2fc4c7c460a87151 (diff) |
btrfs: separate superblock items out of fs_info
fs_info has now ~9kb, more than fits into one page. This will cause
mount failure when memory is too fragmented. Top space consumers are
super block structures super_copy and super_for_commit, ~2.8kb each.
Allocate them dynamically. fs_info will be ~3.5kb. (measured on x86_64)
Add a wrapper for freeing fs_info and all of it's dynamically allocated
members.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8ca1b6b83bd1..f4d81c06d48f 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -2118,9 +2118,9 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
2118 | BUG_ON(ret); | 2118 | BUG_ON(ret); |
2119 | btrfs_wait_marked_extents(log, &log->dirty_log_pages, mark); | 2119 | btrfs_wait_marked_extents(log, &log->dirty_log_pages, mark); |
2120 | 2120 | ||
2121 | btrfs_set_super_log_root(&root->fs_info->super_for_commit, | 2121 | btrfs_set_super_log_root(root->fs_info->super_for_commit, |
2122 | log_root_tree->node->start); | 2122 | log_root_tree->node->start); |
2123 | btrfs_set_super_log_root_level(&root->fs_info->super_for_commit, | 2123 | btrfs_set_super_log_root_level(root->fs_info->super_for_commit, |
2124 | btrfs_header_level(log_root_tree->node)); | 2124 | btrfs_header_level(log_root_tree->node)); |
2125 | 2125 | ||
2126 | log_root_tree->log_batch = 0; | 2126 | log_root_tree->log_batch = 0; |