提交 8804630e 编写于 作者: B Brian Foster 提交者: Darrick J. Wong

xfs: defer agfl frees from directory op transactions

Directory operations can perform block allocations as entries are
added/removed from directories. Defer AGFL block frees from the
remaining directory operation transactions. This covers the hard
link, remove and rename operations.
Signed-off-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 8b922f0e
......@@ -1464,6 +1464,7 @@ xfs_link(
}
xfs_defer_init(&dfops, &first_block);
tp->t_agfl_dfops = &dfops;
/*
* Handle initial link state of O_TMPFILE inode
......@@ -2661,6 +2662,7 @@ xfs_remove(
goto out_trans_cancel;
xfs_defer_init(&dfops, &first_block);
tp->t_agfl_dfops = &dfops;
error = xfs_dir_removename(tp, dp, name, ip->i_ino,
&first_block, &dfops, resblks);
if (error) {
......@@ -3028,6 +3030,7 @@ xfs_rename(
}
xfs_defer_init(&dfops, &first_block);
tp->t_agfl_dfops = &dfops;
/* RENAME_EXCHANGE is unique from here on. */
if (flags & RENAME_EXCHANGE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册