aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/flexfilelayout/flexfilelayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayout.c')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 0fbf37de2a41..9f6fb8876b3f 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -533,14 +533,17 @@ nfs4_ff_layoutstat_start_io(struct nfs4_ff_layout_mirror *mirror,
533 ktime_t now) 533 ktime_t now)
534{ 534{
535 static const ktime_t notime = {0}; 535 static const ktime_t notime = {0};
536 s64 report_interval = FF_LAYOUTSTATS_REPORT_INTERVAL;
536 537
537 nfs4_ff_start_busy_timer(&layoutstat->busy_timer, now); 538 nfs4_ff_start_busy_timer(&layoutstat->busy_timer, now);
538 if (ktime_equal(mirror->start_time, notime)) 539 if (ktime_equal(mirror->start_time, notime))
539 mirror->start_time = now; 540 mirror->start_time = now;
540 if (ktime_equal(mirror->last_report_time, notime)) 541 if (ktime_equal(mirror->last_report_time, notime))
541 mirror->last_report_time = now; 542 mirror->last_report_time = now;
543 if (layoutstats_timer != 0)
544 report_interval = (s64)layoutstats_timer * 1000LL;
542 if (ktime_to_ms(ktime_sub(now, mirror->last_report_time)) >= 545 if (ktime_to_ms(ktime_sub(now, mirror->last_report_time)) >=
543 FF_LAYOUTSTATS_REPORT_INTERVAL) { 546 report_interval) {
544 mirror->last_report_time = now; 547 mirror->last_report_time = now;
545 return true; 548 return true;
546 } 549 }