Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix int overflow in zbookmark_is_before()
When the DSL scan code tries to resume the scrub from the saved zbookmark calls dsl_scan_check_resume()->zbookmark_is_before() to decide if the current dnode still needs to be visited. A subtle int overflow condition in zbookmark_is_before(), exacerbated by bumping the indirect block size to 128K (d7958b4), can lead to the wrong assuption that the dnode does not need to be scanned. This results in scrubs completing "successfully" in matter of mere minutes on pools with several TB of used space because every time we try to resume the dnode traversal on a dataset zbookmark_is_before() tells us the whole objset has already been scanned completely. Fix this by forcing the right shift operator to be executed before the multiplication, as done in zbookmark_compare() (fcff0f3). Signed-off-by: loli10K <[email protected]>
- Loading branch information