aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2011-04-13 09:41:04 -0400
committerChris Mason <chris.mason@oracle.com>2011-11-06 03:04:01 -0500
commit6c41761fc6efe1503103a1afe03a6635c0b5d4ec (patch)
tree08ad34d43aac48e8f8143a0b1fa07141df8f202a /fs/btrfs/inode.c
parentc8174313a8102e874aaa321e2fc4c7c460a87151 (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/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a8586e10953c..b6b612e14ed7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -824,7 +824,7 @@ static noinline int cow_file_range(struct inode *inode,
824 } 824 }
825 825
826 BUG_ON(disk_num_bytes > 826 BUG_ON(disk_num_bytes >
827 btrfs_super_total_bytes(&root->fs_info->super_copy)); 827 btrfs_super_total_bytes(root->fs_info->super_copy));
828 828
829 alloc_hint = get_extent_allocation_hint(inode, start, num_bytes); 829 alloc_hint = get_extent_allocation_hint(inode, start, num_bytes);
830 btrfs_drop_extent_cache(inode, start, start + num_bytes - 1, 0); 830 btrfs_drop_extent_cache(inode, start, start + num_bytes - 1, 0);