提交 06d3d22b 编写于 作者: L Liu Bo 提交者: Chris Mason

Btrfs: cleanup extents after we finish logging inode

This is based on Josef's "Btrfs: turbo charge fsync".

We should cleanup those extents after we've finished logging inode,
otherwise we may do redundant work on them.
Signed-off-by: NLiu Bo <bo.li.liu@oracle.com>
上级 0fa83cdb
......@@ -3167,6 +3167,12 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans,
err = ret;
goto out_unlock;
}
} else {
struct extent_map_tree *tree = &BTRFS_I(inode)->extent_tree;
struct extent_map *em, *n;
list_for_each_entry_safe(em, n, &tree->modified_extents, list)
list_del_init(&em->list);
}
if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册