From 309873304bc1e8d7d786e85d6ca03eea16908e5d Mon Sep 17 00:00:00 2001 From: Aiden Baker Date: Wed, 7 Aug 2024 12:21:05 -0400 Subject: [PATCH] Fixed possible divide by zero --- libzfs.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libzfs.pyx b/libzfs.pyx index 363ebe8..592f56f 100644 --- a/libzfs.pyx +++ b/libzfs.pyx @@ -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)