Skip to content

Commit

Permalink
Matched time left to upstream zfs
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden3c committed Aug 7, 2024
1 parent 3d3fce5 commit 7bc82fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libzfs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2711,10 +2711,10 @@ cdef class ZPoolScrub(object):
if self.state != ScanState.SCANNING:
return

total = self.bytes_to_scan
total = self.bytes_to_scan - self.stats.pss_skipped
issued = self.bytes_issued
elapsed = ((int(time.time()) - self.stats.pss_pass_start) - self.stats.pss_pass_scrub_spent_paused) or 1
pass_issued = self.stats.pss_pass_issued or 1
pass_issued = self.stats.pss_pass_issued
issue_rate = pass_issued / elapsed
return int((total - issued) / issue_rate)

Expand Down

0 comments on commit 7bc82fd

Please sign in to comment.