Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 May 2017 16:47:00 +0000 (UTC)
From:      Michael Reifenberger <mr@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318577 - head/etc/periodic/daily
Message-ID:  <201705201647.v4KGl0Lx010049@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mr
Date: Sat May 20 16:47:00 2017
New Revision: 318577
URL: https://svnweb.freebsd.org/changeset/base/318577

Log:
  Improve time-since-last-scrub calculation.
  This can be needed to compensate anticongestion delays in 410.pkg-audit or 480.leapfile-ntpd.
  
  PR:		217622
  Submitted by:	wbe@psr.com
  MFC after:	2 weeks

Modified:
  head/etc/periodic/daily/800.scrub-zfs

Modified: head/etc/periodic/daily/800.scrub-zfs
==============================================================================
--- head/etc/periodic/daily/800.scrub-zfs	Sat May 20 16:12:44 2017	(r318576)
+++ head/etc/periodic/daily/800.scrub-zfs	Sat May 20 16:47:00 2017	(r318577)
@@ -71,7 +71,7 @@ case "$daily_scrub_zfs_enable" in
 
 		# Now minus last scrub (both in seconds) converted to days.
 		_scrub_diff=$(expr -e \( $(date +%s) - \
-		    $(date -j -f %F.%T ${_last_scrub} +%s) \) / 60 / 60 / 24)
+		    $(date -j -v -70M -f %F.%T ${_last_scrub} +%s) \) / 60 / 60 / 24)
 		if [ ${_scrub_diff} -lt ${_pool_threshold} ]; then
 			echo "   skipping scrubbing of pool '${pool}':"
 			echo "      last scrubbing is ${_scrub_diff} days ago, threshold is set to ${_pool_threshold} days"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705201647.v4KGl0Lx010049>