Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
edf39272
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
edf39272
编写于
6月 28, 2012
作者:
J
Jan Schmidt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: call the qgroup accounting functions
Signed-off-by:
N
Jan Schmidt
<
list.btrfs@jan-o-sch.net
>
上级
bed92eae
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
0 deletion
+17
-0
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+3
-0
fs/btrfs/transaction.c
fs/btrfs/transaction.c
+14
-0
未找到文件。
fs/btrfs/extent-tree.c
浏览文件 @
edf39272
...
...
@@ -2479,6 +2479,8 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
2
*
1024
*
1024
,
btrfs_get_alloc_profile
(
root
,
0
),
CHUNK_ALLOC_NO_FORCE
);
btrfs_delayed_refs_qgroup_accounting
(
trans
,
root
->
fs_info
);
delayed_refs
=
&
trans
->
transaction
->
delayed_refs
;
INIT_LIST_HEAD
(
&
cluster
);
again:
...
...
@@ -2588,6 +2590,7 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
}
out:
spin_unlock
(
&
delayed_refs
->
lock
);
assert_qgroups_uptodate
(
trans
);
return
0
;
}
...
...
fs/btrfs/transaction.c
浏览文件 @
edf39272
...
...
@@ -512,6 +512,11 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
return
0
;
}
/*
* do the qgroup accounting as early as possible
*/
err
=
btrfs_delayed_refs_qgroup_accounting
(
trans
,
info
);
btrfs_trans_release_metadata
(
trans
,
root
);
trans
->
block_rsv
=
NULL
;
/*
...
...
@@ -571,6 +576,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
root
->
fs_info
->
fs_state
&
BTRFS_SUPER_FLAG_ERROR
)
{
err
=
-
EIO
;
}
assert_qgroups_uptodate
(
trans
);
memset
(
trans
,
0
,
sizeof
(
*
trans
));
kmem_cache_free
(
btrfs_trans_handle_cachep
,
trans
);
...
...
@@ -1355,6 +1361,13 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
if
(
ret
)
goto
cleanup_transaction
;
/*
* running the delayed items may have added new refs. account
* them now so that they hinder processing of more delayed refs
* as little as possible.
*/
btrfs_delayed_refs_qgroup_accounting
(
trans
,
root
->
fs_info
);
/*
* rename don't use btrfs_join_transaction, so, once we
* set the transaction to blocked above, we aren't going
...
...
@@ -1467,6 +1480,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
root
->
fs_info
->
chunk_root
->
node
);
switch_commit_root
(
root
->
fs_info
->
chunk_root
);
assert_qgroups_uptodate
(
trans
);
update_super_roots
(
root
);
if
(
!
root
->
fs_info
->
log_root_recovering
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录