Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
edf39272
Commit
edf39272
authored
Jun 28, 2012
by
Jan Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: call the qgroup accounting functions
Signed-off-by:
Jan Schmidt
<
list.btrfs@jan-o-sch.net
>
parent
bed92eae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+3
-0
fs/btrfs/transaction.c
fs/btrfs/transaction.c
+14
-0
No files found.
fs/btrfs/extent-tree.c
View file @
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
View file @
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment