diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2012-09-14 04:58:07 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-04 09:39:57 -0400 |
commit | 6bbe3a9c805fcb8cd8d396dafd32078181a7cdd5 (patch) | |
tree | 46bd39cb7961d3c44e7e2c28f6aec6ec9684ac8d | |
parent | 2e90cf858fd2639eae2fb3f2173f7633cb15bf38 (diff) |
Btrfs: kill obsolete arguments in btrfs_wait_ordered_extents
nocow_only is now an obsolete argument.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 | ||||
-rw-r--r-- | fs/btrfs/ordered-data.c | 12 | ||||
-rw-r--r-- | fs/btrfs/ordered-data.h | 3 | ||||
-rw-r--r-- | fs/btrfs/relocation.c | 2 | ||||
-rw-r--r-- | fs/btrfs/super.c | 2 | ||||
-rw-r--r-- | fs/btrfs/transaction.c | 2 |
6 files changed, 7 insertions, 18 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 27a6b3e6fa41..a3a902fdeb49 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3722,7 +3722,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig, | |||
3722 | if (delalloc_bytes == 0) { | 3722 | if (delalloc_bytes == 0) { |
3723 | if (trans) | 3723 | if (trans) |
3724 | return; | 3724 | return; |
3725 | btrfs_wait_ordered_extents(root, 0, 0); | 3725 | btrfs_wait_ordered_extents(root, 0); |
3726 | return; | 3726 | return; |
3727 | } | 3727 | } |
3728 | 3728 | ||
@@ -3748,7 +3748,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig, | |||
3748 | 3748 | ||
3749 | loops++; | 3749 | loops++; |
3750 | if (wait_ordered && !trans) { | 3750 | if (wait_ordered && !trans) { |
3751 | btrfs_wait_ordered_extents(root, 0, 0); | 3751 | btrfs_wait_ordered_extents(root, 0); |
3752 | } else { | 3752 | } else { |
3753 | time_left = schedule_timeout_killable(1); | 3753 | time_left = schedule_timeout_killable(1); |
3754 | if (time_left) | 3754 | if (time_left) |
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index e2b3d994ec01..7772f02ba28e 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -468,8 +468,7 @@ void btrfs_remove_ordered_extent(struct inode *inode, | |||
468 | * wait for all the ordered extents in a root. This is done when balancing | 468 | * wait for all the ordered extents in a root. This is done when balancing |
469 | * space between drives. | 469 | * space between drives. |
470 | */ | 470 | */ |
471 | void btrfs_wait_ordered_extents(struct btrfs_root *root, | 471 | void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput) |
472 | int nocow_only, int delay_iput) | ||
473 | { | 472 | { |
474 | struct list_head splice; | 473 | struct list_head splice; |
475 | struct list_head *cur; | 474 | struct list_head *cur; |
@@ -484,15 +483,6 @@ void btrfs_wait_ordered_extents(struct btrfs_root *root, | |||
484 | cur = splice.next; | 483 | cur = splice.next; |
485 | ordered = list_entry(cur, struct btrfs_ordered_extent, | 484 | ordered = list_entry(cur, struct btrfs_ordered_extent, |
486 | root_extent_list); | 485 | root_extent_list); |
487 | if (nocow_only && | ||
488 | !test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags) && | ||
489 | !test_bit(BTRFS_ORDERED_PREALLOC, &ordered->flags)) { | ||
490 | list_move(&ordered->root_extent_list, | ||
491 | &root->fs_info->ordered_extents); | ||
492 | cond_resched_lock(&root->fs_info->ordered_extent_lock); | ||
493 | continue; | ||
494 | } | ||
495 | |||
496 | list_del_init(&ordered->root_extent_list); | 486 | list_del_init(&ordered->root_extent_list); |
497 | atomic_inc(&ordered->refs); | 487 | atomic_inc(&ordered->refs); |
498 | 488 | ||
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h index d1ddaeff1356..dd27a0b46a37 100644 --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h | |||
@@ -190,8 +190,7 @@ void btrfs_run_ordered_operations(struct btrfs_root *root, int wait); | |||
190 | void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, | 190 | void btrfs_add_ordered_operation(struct btrfs_trans_handle *trans, |
191 | struct btrfs_root *root, | 191 | struct btrfs_root *root, |
192 | struct inode *inode); | 192 | struct inode *inode); |
193 | void btrfs_wait_ordered_extents(struct btrfs_root *root, | 193 | void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput); |
194 | int nocow_only, int delay_iput); | ||
195 | int __init ordered_data_init(void); | 194 | int __init ordered_data_init(void); |
196 | void ordered_data_exit(void); | 195 | void ordered_data_exit(void); |
197 | #endif | 196 | #endif |
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 7e7fd1bcfc54..6e530bb86c94 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -4058,7 +4058,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start) | |||
4058 | (unsigned long long)rc->block_group->flags); | 4058 | (unsigned long long)rc->block_group->flags); |
4059 | 4059 | ||
4060 | btrfs_start_delalloc_inodes(fs_info->tree_root, 0); | 4060 | btrfs_start_delalloc_inodes(fs_info->tree_root, 0); |
4061 | btrfs_wait_ordered_extents(fs_info->tree_root, 0, 0); | 4061 | btrfs_wait_ordered_extents(fs_info->tree_root, 0); |
4062 | 4062 | ||
4063 | while (1) { | 4063 | while (1) { |
4064 | mutex_lock(&fs_info->cleaner_mutex); | 4064 | mutex_lock(&fs_info->cleaner_mutex); |
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 903ab2d7068a..5aa3b8182d96 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -852,7 +852,7 @@ int btrfs_sync_fs(struct super_block *sb, int wait) | |||
852 | return 0; | 852 | return 0; |
853 | } | 853 | } |
854 | 854 | ||
855 | btrfs_wait_ordered_extents(root, 0, 0); | 855 | btrfs_wait_ordered_extents(root, 0); |
856 | 856 | ||
857 | trans = btrfs_join_transaction_freeze(root); | 857 | trans = btrfs_join_transaction_freeze(root); |
858 | if (IS_ERR(trans)) { | 858 | if (IS_ERR(trans)) { |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index e4bfac8d54b8..c9265a603488 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -1475,7 +1475,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1475 | 1475 | ||
1476 | if (flush_on_commit || snap_pending) { | 1476 | if (flush_on_commit || snap_pending) { |
1477 | btrfs_start_delalloc_inodes(root, 1); | 1477 | btrfs_start_delalloc_inodes(root, 1); |
1478 | btrfs_wait_ordered_extents(root, 0, 1); | 1478 | btrfs_wait_ordered_extents(root, 1); |
1479 | } | 1479 | } |
1480 | 1480 | ||
1481 | ret = btrfs_run_delayed_items(trans, root); | 1481 | ret = btrfs_run_delayed_items(trans, root); |