diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2013-08-09 13:25:36 +0800 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 08:16:27 -0400 |
commit | b9e9a6cbc6d25b89d8007e5a680319e07921ead8 (patch) | |
tree | 600fe0d3d6962bf13d6efbca1ddc9cbcb4f0d06b /fs/btrfs/backref.h | |
parent | 742916b885edbc6453b4769458959929746e8e7e (diff) | |
download | linux-b9e9a6cbc6d25b89d8007e5a680319e07921ead8.tar.gz linux-b9e9a6cbc6d25b89d8007e5a680319e07921ead8.tar.bz2 linux-b9e9a6cbc6d25b89d8007e5a680319e07921ead8.zip |
Btrfs: allocate prelim_ref with a slab allocater
struct __prelim_ref is allocated and freed frequently when
walking backref tree, using slab allocater can not only
speed up allocating but also detect memory leaks.
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Reviewed-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/backref.h')
-rw-r--r-- | fs/btrfs/backref.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/backref.h b/fs/btrfs/backref.h index 8f2e76702932..a910b27a8ad9 100644 --- a/fs/btrfs/backref.h +++ b/fs/btrfs/backref.h @@ -72,4 +72,6 @@ int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid, struct btrfs_inode_extref **ret_extref, u64 *found_off); +int __init btrfs_prelim_ref_init(void); +void btrfs_prelim_ref_exit(void); #endif |