File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -4901,18 +4901,18 @@ btrfs_calc_reclaim_metadata_size(struct btrfs_root *root,
4901
4901
u64 expected ;
4902
4902
u64 to_reclaim = 0 ;
4903
4903
4904
- to_reclaim = min_t (u64 , num_online_cpus () * SZ_1M , SZ_16M );
4905
- if (can_overcommit (root , space_info , to_reclaim ,
4906
- BTRFS_RESERVE_FLUSH_ALL ))
4907
- return 0 ;
4908
-
4909
4904
list_for_each_entry (ticket , & space_info -> tickets , list )
4910
4905
to_reclaim += ticket -> bytes ;
4911
4906
list_for_each_entry (ticket , & space_info -> priority_tickets , list )
4912
4907
to_reclaim += ticket -> bytes ;
4913
4908
if (to_reclaim )
4914
4909
return to_reclaim ;
4915
4910
4911
+ to_reclaim = min_t (u64 , num_online_cpus () * SZ_1M , SZ_16M );
4912
+ if (can_overcommit (root , space_info , to_reclaim ,
4913
+ BTRFS_RESERVE_FLUSH_ALL ))
4914
+ return 0 ;
4915
+
4916
4916
used = space_info -> bytes_used + space_info -> bytes_reserved +
4917
4917
space_info -> bytes_pinned + space_info -> bytes_readonly +
4918
4918
space_info -> bytes_may_use ;
Original file line number Diff line number Diff line change @@ -4200,9 +4200,11 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
4200
4200
err = PTR_ERR (trans );
4201
4201
goto out_free ;
4202
4202
}
4203
- err = qgroup_fix_relocated_data_extents (trans , rc );
4204
- if (err < 0 ) {
4205
- btrfs_abort_transaction (trans , err );
4203
+ ret = qgroup_fix_relocated_data_extents (trans , rc );
4204
+ if (ret < 0 ) {
4205
+ btrfs_abort_transaction (trans , ret );
4206
+ if (!err )
4207
+ err = ret ;
4206
4208
goto out_free ;
4207
4209
}
4208
4210
btrfs_commit_transaction (trans , rc -> extent_root );
Original file line number Diff line number Diff line change @@ -4268,10 +4268,12 @@ static int process_all_refs(struct send_ctx *sctx,
4268
4268
}
4269
4269
btrfs_release_path (path );
4270
4270
4271
+ /*
4272
+ * We don't actually care about pending_move as we are simply
4273
+ * re-creating this inode and will be rename'ing it into place once we
4274
+ * rename the parent directory.
4275
+ */
4271
4276
ret = process_recorded_refs (sctx , & pending_move );
4272
- /* Only applicable to an incremental send. */
4273
- ASSERT (pending_move == 0 );
4274
-
4275
4277
out :
4276
4278
btrfs_free_path (path );
4277
4279
return ret ;
You can’t perform that action at this time.
0 commit comments