[Bug 217622] 1-line patch for daily/800.scrub_zfs to fix interval calculation
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Mar 8 00:22:12 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217622
Bug ID: 217622
Summary: 1-line patch for daily/800.scrub_zfs to fix interval
calculation
Product: Base System
Version: 11.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: misc
Assignee: freebsd-bugs at FreeBSD.org
Reporter: wbe at psr.com
Created attachment 180615
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180615&action=edit
1-line patch to line 73 of 800.scrub-zfs to add " -v -70M"
The enclosed patch improves the time-since-last-scrub calculation.
In general, for, say, the default interval of 35 days, the old code treats
34d 23h 59m 59s as 34 days and defers scrubbing to the next day, making the
actual interval 36 days. In addition, there are two typical causes of being
a few seconds (or minutes) shy of a full day:
1) a few seconds pass between the date test and the actual starting of a scrub;
and 2) when 410.pkg-audit is run before 800.scrub-zfs, a random interval of up
to 1 hour is introduced.
Adding " -v 70M" to the date command effectively rounds up anything within 70
minutes of a full day to the next full day.
This affects everyone using periodic daily/800.scrub-zfs.
-WBE
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list