diff options
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 9c8f158dd2db..664782c6a2df 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -975,6 +975,8 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
975 | int should_grow = 0; | 975 | int should_grow = 0; |
976 | unsigned long now = get_seconds(); | 976 | unsigned long now = get_seconds(); |
977 | 977 | ||
978 | btrfs_run_ordered_operations(root, 0); | ||
979 | |||
978 | /* make a pass through all the delayed refs we have so far | 980 | /* make a pass through all the delayed refs we have so far |
979 | * any runnings procs may add more while we are here | 981 | * any runnings procs may add more while we are here |
980 | */ | 982 | */ |
@@ -1056,6 +1058,15 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1056 | BUG_ON(ret); | 1058 | BUG_ON(ret); |
1057 | } | 1059 | } |
1058 | 1060 | ||
1061 | /* | ||
1062 | * rename don't use btrfs_join_transaction, so, once we | ||
1063 | * set the transaction to blocked above, we aren't going | ||
1064 | * to get any new ordered operations. We can safely run | ||
1065 | * it here and no for sure that nothing new will be added | ||
1066 | * to the list | ||
1067 | */ | ||
1068 | btrfs_run_ordered_operations(root, 1); | ||
1069 | |||
1059 | smp_mb(); | 1070 | smp_mb(); |
1060 | if (cur_trans->num_writers > 1 || should_grow) | 1071 | if (cur_trans->num_writers > 1 || should_grow) |
1061 | schedule_timeout(timeout); | 1072 | schedule_timeout(timeout); |