Btrfs: kill obsolete arguments in btrfs_wait_ordered_extents
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 14 Sep 2012 08:58:07 +0000 (02:58 -0600)
committerChris Mason <chris.mason@fusionio.com>
Thu, 4 Oct 2012 13:39:57 +0000 (09:39 -0400)
nocow_only is now an obsolete argument.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
fs/btrfs/extent-tree.c
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h
fs/btrfs/relocation.c
fs/btrfs/super.c
fs/btrfs/transaction.c

index 27a6b3e6fa41f5c7ca606769c8cbf809b84b19c3..a3a902fdeb49ee2d0c11625d9fe1e5340f070339 100644 (file)
@@ -3722,7 +3722,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig,
        if (delalloc_bytes == 0) {
                if (trans)
                        return;
-               btrfs_wait_ordered_extents(root, 0, 0);
+               btrfs_wait_ordered_extents(root, 0);
                return;
        }
 
@@ -3748,7 +3748,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig,
 
                loops++;
                if (wait_ordered && !trans) {
-                       btrfs_wait_ordered_extents(root, 0, 0);
+                       btrfs_wait_ordered_extents(root, 0);
                } else {
                        time_left = schedule_timeout_killable(1);
                        if (time_left)
index e2b3d994ec01b69726947cb341b8ca5525d23fdc..7772f02ba28e6966826c0d897475961ad628c2f5 100644 (file)
@@ -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
  * space between drives.
  */
-void btrfs_wait_ordered_extents(struct btrfs_root *root,
-                               int nocow_only, int delay_iput)
+void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput)
 {
        struct list_head splice;
        struct list_head *cur;
@@ -484,15 +483,6 @@ void btrfs_wait_ordered_extents(struct btrfs_root *root,
                cur = splice.next;
                ordered = list_entry(cur, struct btrfs_ordered_extent,
                                     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);
                atomic_inc(&ordered->refs);
 
index d1ddaeff13562d9693b61f9982f664d017f00f09..dd27a0b46a37d1dfd878828672dfb0dbe99f5ac8 100644 (file)
@@ -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,
                                 struct btrfs_root *root,
                                 struct inode *inode);
-void btrfs_wait_ordered_extents(struct btrfs_root *root,
-                               int nocow_only, int delay_iput);
+void btrfs_wait_ordered_extents(struct btrfs_root *root, int delay_iput);
 int __init ordered_data_init(void);
 void ordered_data_exit(void);
 #endif
index 7e7fd1bcfc5414504f4357bbafe32f7846ec2789..6e530bb86c94fe6d60e7db87496b57b44d1a8c3f 100644 (file)
@@ -4058,7 +4058,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
               (unsigned long long)rc->block_group->flags);
 
        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) {
                mutex_lock(&fs_info->cleaner_mutex);
index 903ab2d7068aeac8a06d27a600812234dbfec697..5aa3b8182d9623b0678cea664ea0e14f0482a5f8 100644 (file)
@@ -852,7 +852,7 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
                return 0;
        }
 
-       btrfs_wait_ordered_extents(root, 0, 0);
+       btrfs_wait_ordered_extents(root, 0);
 
        trans = btrfs_join_transaction_freeze(root);
        if (IS_ERR(trans)) {
index e4bfac8d54b8827800fde80cfe84ba94ed96060a..c9265a603488cea14574dd1c8e95c679b650ab13 100644 (file)
@@ -1475,7 +1475,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
 
                if (flush_on_commit || snap_pending) {
                        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);