-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAS-125883 / 24.04 / Account for pss_skipped
in scan progress
#251
Conversation
time 1:00 |
pss_skipped
in scan progresspss_skipped
in scan progress
I need this to build truenas/py-libzfs#251
9044011
to
6780df8
Compare
6780df8
to
0b2ab05
Compare
time 1:00 |
libzfs.pyx
Outdated
@@ -2644,7 +2649,7 @@ cdef class ZPoolScrub(object): | |||
if not self.bytes_to_scan: | |||
return 0 | |||
|
|||
return (<float>self.bytes_issued / <float>self.bytes_to_scan) * 100 | |||
return (<float>self.bytes_issued / (<float>self.bytes_to_scan - <float>self.bytes_skipped)) * 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In zpool I also check for bytes_to_scan > bytes_skipped to avoid division by zero, but it should probably be extremely rare, if ever happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amotin i approve but does this look good to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose 'if not self.bytes_to_scan:' is no longer needed. It protected from the divisions by zero before, just condition has changed.
But generally it looks good to me.
This PR has been merged and conversations have been locked. |
No description provided.