diff options
author | Lu Fengqi <lufq.fnst@cn.fujitsu.com> | 2018-10-11 13:40:36 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-10-15 17:23:41 +0200 |
commit | 7c8616278b19c42141ff4617573cbf950f4a456b (patch) | |
tree | b272a325fedfcc5b39892c11377fe7ce285c17f2 /fs/btrfs/extent-tree.c | |
parent | af9b8a0e2085fc90dca85acd85ee83ece7c05130 (diff) | |
download | lwn-7c8616278b19c42141ff4617573cbf950f4a456b.tar.gz lwn-7c8616278b19c42141ff4617573cbf950f4a456b.zip |
btrfs: remove fs_info from btrfs_should_throttle_delayed_refs
The avg_delayed_ref_runtime can be referenced from the transaction
handle.
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c7de1e720f56..a4cd0221bc8d 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2826,8 +2826,7 @@ int btrfs_check_space_for_delayed_refs(struct btrfs_trans_handle *trans) return ret; } -int btrfs_should_throttle_delayed_refs(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info) +int btrfs_should_throttle_delayed_refs(struct btrfs_trans_handle *trans) { u64 num_entries = atomic_read(&trans->transaction->delayed_refs.num_entries); @@ -2835,7 +2834,7 @@ int btrfs_should_throttle_delayed_refs(struct btrfs_trans_handle *trans, u64 val; smp_mb(); - avg_runtime = fs_info->avg_delayed_ref_runtime; + avg_runtime = trans->fs_info->avg_delayed_ref_runtime; val = num_entries * avg_runtime; if (val >= NSEC_PER_SEC) return 1; |