Skip to content

Commit

Permalink
Fixed possible divide by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden3c committed Aug 7, 2024
1 parent 7bc82fd commit 3098733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libzfs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2714,7 +2714,7 @@ cdef class ZPoolScrub(object):
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
pass_issued = self.stats.pss_pass_issued or 1
issue_rate = pass_issued / elapsed
return int((total - issued) / issue_rate)

Expand Down

0 comments on commit 3098733

Please sign in to comment.