* [PATCH v2] btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs()
@ 2016-10-26 7:23 Wang Xiaoguang
2016-10-31 16:42 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Wang Xiaoguang @ 2016-10-26 7:23 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba
Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
---
fs/btrfs/extent-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 9aa6d2c..3c8f0ec 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2823,7 +2823,7 @@ int btrfs_should_throttle_delayed_refs(struct btrfs_trans_handle *trans,
smp_mb();
avg_runtime = fs_info->avg_delayed_ref_runtime;
val = num_entries * avg_runtime;
- if (num_entries * avg_runtime >= NSEC_PER_SEC)
+ if (val >= NSEC_PER_SEC)
return 1;
if (val >= NSEC_PER_SEC / 2)
return 2;
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs()
2016-10-26 7:23 [PATCH v2] btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs() Wang Xiaoguang
@ 2016-10-31 16:42 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2016-10-31 16:42 UTC (permalink / raw)
To: Wang Xiaoguang; +Cc: linux-btrfs, dsterba
On Wed, Oct 26, 2016 at 03:23:01PM +0800, Wang Xiaoguang wrote:
> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-31 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-26 7:23 [PATCH v2] btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs() Wang Xiaoguang
2016-10-31 16:42 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).