diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-11-21 02:21:28 +0000 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 09:36:34 -0500 |
commit | 78a6184a3ff9041280ee56273c01e5679a831b39 (patch) | |
tree | 0310eb020cf6ed7a8ff71feb8c468bb6e42488fa /fs/btrfs/super.c | |
parent | 6f60cbd3ae442cb35861bb522f388db123d42ec1 (diff) | |
download | linux-78a6184a3ff9041280ee56273c01e5679a831b39.tar.gz linux-78a6184a3ff9041280ee56273c01e5679a831b39.tar.bz2 linux-78a6184a3ff9041280ee56273c01e5679a831b39.zip |
Btrfs: use slabs for delayed reference allocation
The delayed reference 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>
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 d8982e9601d3..67b373bf3ff9 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1684,10 +1684,14 @@ static int __init init_btrfs_fs(void) if (err) goto free_delayed_inode; - err = btrfs_interface_init(); + err = btrfs_delayed_ref_init(); if (err) goto free_auto_defrag; + err = btrfs_interface_init(); + if (err) + goto free_delayed_ref; + err = register_filesystem(&btrfs_fs_type); if (err) goto unregister_ioctl; @@ -1699,6 +1703,8 @@ static int __init init_btrfs_fs(void) unregister_ioctl: btrfs_interface_exit(); +free_delayed_ref: + btrfs_delayed_ref_exit(); free_auto_defrag: btrfs_auto_defrag_exit(); free_delayed_inode: @@ -1720,6 +1726,7 @@ free_compress: static void __exit exit_btrfs_fs(void) { btrfs_destroy_cachep(); + btrfs_delayed_ref_exit(); btrfs_auto_defrag_exit(); btrfs_delayed_inode_exit(); ordered_data_exit(); |