Commit 6bbe3a9c authored by Liu Bo's avatar Liu Bo Committed by Chris Mason

Btrfs: kill obsolete arguments in btrfs_wait_ordered_extents

nocow_only is now an obsolete argument.
Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
parent 2e90cf85
...@@ -3722,7 +3722,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig, ...@@ -3722,7 +3722,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig,
if (delalloc_bytes == 0) { if (delalloc_bytes == 0) {
if (trans) if (trans)
return; return;
btrfs_wait_ordered_extents(root, 0, 0); btrfs_wait_ordered_extents(root, 0);
return; return;
} }
...@@ -3748,7 +3748,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig, ...@@ -3748,7 +3748,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig,
loops++; loops++;
if (wait_ordered && !trans) { if (wait_ordered && !trans) {
btrfs_wait_ordered_extents(root, 0, 0); btrfs_wait_ordered_extents(root, 0);
} else { } else {
time_left = schedule_timeout_killable(1); time_left = schedule_timeout_killable(1);
if (time_left) if (time_left)
......
...@@ -468,8 +468,7 @@ void btrfs_remove_ordered_extent(struct inode *inode, ...@@ -468,8 +468,7 @@ void btrfs_remove_ordered_extent(struct inode *inode,
* wait for all the ordered extents in a root. This is done when balancing * wait for all the ordered extents in a root. This is done when balancing
* space between drives. * space between drives.
*/ */
void btrfs_wait_ordered_extents(struct btrfs_root *root, void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput)
int nocow_only, int delay_iput)
{ {
struct list_head splice; struct list_head splice;
struct list_head *cur; struct list_head *cur;
...@@ -484,15 +483,6 @@ void btrfs_wait_ordered_extents(struct btrfs_root *root, ...@@ -484,15 +483,6 @@ void btrfs_wait_ordered_extents(struct btrfs_root *root,
cur = splice.next; cur = splice.next;
ordered = list_entry(cur, struct btrfs_ordered_extent, ordered = list_entry(cur, struct btrfs_ordered_extent,
root_extent_list); root_extent_list);
if (nocow_only &&
!test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags) &&
!test_bit(BTRFS_ORDERED_PREALLOC, &ordered->flags)) {
list_move(&ordered->root_extent_list,
&root->fs_info->ordered_extents);
cond_resched_lock(&root->fs_info->ordered_extent_lock);
continue;
}
list_del_init(&ordered->root_extent_list); list_del_init(&ordered->root_extent_list);
atomic_inc(&ordered->refs); atomic_inc(&ordered->refs);
......
...@@ -190,8 +190,7 @@ void btrfs_run_ordered_operations(struct btrfs_root *root, int wait); ...@@ -190,8 +190,7 @@ void btrfs_run_ordered_operations(struct btrfs_root *root, int wait);
void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_root *root,
struct inode *inode); struct inode *inode);
void btrfs_wait_ordered_extents(struct btrfs_root *root, void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput);
int nocow_only, int delay_iput);
int __init ordered_data_init(void); int __init ordered_data_init(void);
void ordered_data_exit(void); void ordered_data_exit(void);
#endif #endif
...@@ -4058,7 +4058,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start) ...@@ -4058,7 +4058,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
(unsigned long long)rc->block_group->flags); (unsigned long long)rc->block_group->flags);
btrfs_start_delalloc_inodes(fs_info->tree_root, 0); btrfs_start_delalloc_inodes(fs_info->tree_root, 0);
btrfs_wait_ordered_extents(fs_info->tree_root, 0, 0); btrfs_wait_ordered_extents(fs_info->tree_root, 0);
while (1) { while (1) {
mutex_lock(&fs_info->cleaner_mutex); mutex_lock(&fs_info->cleaner_mutex);
......
...@@ -852,7 +852,7 @@ int btrfs_sync_fs(struct super_block *sb, int wait) ...@@ -852,7 +852,7 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
return 0; return 0;
} }
btrfs_wait_ordered_extents(root, 0, 0); btrfs_wait_ordered_extents(root, 0);
trans = btrfs_join_transaction_freeze(root); trans = btrfs_join_transaction_freeze(root);
if (IS_ERR(trans)) { if (IS_ERR(trans)) {
......
...@@ -1475,7 +1475,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, ...@@ -1475,7 +1475,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
if (flush_on_commit || snap_pending) { if (flush_on_commit || snap_pending) {
btrfs_start_delalloc_inodes(root, 1); btrfs_start_delalloc_inodes(root, 1);
btrfs_wait_ordered_extents(root, 0, 1); btrfs_wait_ordered_extents(root, 1);
} }
ret = btrfs_run_delayed_items(trans, root); ret = btrfs_run_delayed_items(trans, root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment