btrfs: separate superblock items out of fs_info
authorDavid Sterba <dsterba@suse.cz>
Wed, 13 Apr 2011 13:41:04 +0000 (15:41 +0200)
committerChris Mason <chris.mason@oracle.com>
Sun, 6 Nov 2011 08:04:01 +0000 (03:04 -0500)
commit6c41761fc6efe1503103a1afe03a6635c0b5d4ec
tree08ad34d43aac48e8f8143a0b1fa07141df8f202a
parentc8174313a8102e874aaa321e2fc4c7c460a87151
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>
12 files changed:
fs/btrfs/compression.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/file-item.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/scrub.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/tree-log.c
fs/btrfs/volumes.c