diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-12-26 06:07:06 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-28 22:20:09 +0100 |
commit | 67de11769bd5ec339a62169f500b04f304826c00 (patch) | |
tree | 5939ead04cfd0ca9a3e99d2fa0b2cfa9ac99ba1b /fs/btrfs/btrfs_inode.h | |
parent | Btrfs: use flags instead of the bool variants in delayed node (diff) | |
download | linux-67de11769bd5ec339a62169f500b04f304826c00.tar.xz linux-67de11769bd5ec339a62169f500b04f304826c00.zip |
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>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index ac0b39db27d1..661b0ac90e8f 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -135,6 +135,9 @@ struct btrfs_inode { */ u64 index_cnt; + /* Cache the directory index number to speed the dir/file remove */ + u64 dir_index; + /* the fsync log has some corner cases that mean we have to check * directories to see if any unlinks have been done before * the directory was logged. See tree-log.c for all the |