diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-11-26 09:24:43 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-12-17 01:46:11 (GMT) |
commit | 9247f3170b2c3d648707c93bbebcd763fac17c06 (patch) | |
tree | 6e521e62171197502743b712271438be607ad293 /fs/btrfs/super.c | |
parent | 905b0dda06a064db08b8a814e968786ff3c4cc19 (diff) | |
download | linux-fsl-qoriq-9247f3170b2c3d648707c93bbebcd763fac17c06.tar.xz |
Btrfs: use slabs for auto defrag allocation
The auto defrag allocation is in the fast path of the IO, so use slabs
to improve the speed of the allocation.
And besides that, it can do check for leaked objects when the module is removed.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index def4f24..99545df 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1680,10 +1680,14 @@ static int __init init_btrfs_fs(void) if (err) goto free_ordered_data; - err = btrfs_interface_init(); + err = btrfs_auto_defrag_init(); if (err) goto free_delayed_inode; + err = btrfs_interface_init(); + if (err) + goto free_auto_defrag; + err = register_filesystem(&btrfs_fs_type); if (err) goto unregister_ioctl; @@ -1695,6 +1699,8 @@ static int __init init_btrfs_fs(void) unregister_ioctl: btrfs_interface_exit(); +free_auto_defrag: + btrfs_auto_defrag_exit(); free_delayed_inode: btrfs_delayed_inode_exit(); free_ordered_data: @@ -1714,6 +1720,7 @@ free_compress: static void __exit exit_btrfs_fs(void) { btrfs_destroy_cachep(); + btrfs_auto_defrag_exit(); btrfs_delayed_inode_exit(); ordered_data_exit(); extent_map_exit(); |