]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: introduce the delayed inode ref deletion for the single link inode
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 26 Dec 2013 05:07:06 +0000 (13:07 +0800)
committerChris Mason <clm@fb.com>
Tue, 28 Jan 2014 21:20:09 +0000 (13:20 -0800)
commit13d2145801c701c632544377531d0eadf133235e
tree5939ead04cfd0ca9a3e99d2fa0b2cfa9ac99ba1b
parent7cea2e852c2616aed2a79dcb0a561eada8df46b2
Btrfs: introduce the delayed inode ref deletion for the single link inode

The inode reference item is close to inode item, so we insert it simultaneously
with the inode item insertion when we create a file/directory.. In fact, we also
can handle the inode reference deletion by the same way. So we made this patch to
introduce the delayed inode reference deletion for the single link inode(At most
case, the file doesn't has hard link, so we don't take the hard link into account).

This function is based on the delayed inode mechanism. After applying this patch,
we can reduce the time of the file/directory deletion by ~10%.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/delayed-inode.c
fs/btrfs/delayed-inode.h
fs/btrfs/inode.c