Date: Thu, 25 Aug 2011 18:54:43 +0100 From: Chris Rees <utisoft@gmail.com> To: perryh@pluto.rain.com Cc: vincepoy@gmail.com, freebsd-stable@freebsd.org, freebsd-ports@freebsd.org, freebsd@jdc.parodius.com Subject: Re: ports/sysutils/diskcheckd (Re: bad sector in gmirror HDD) Message-ID: <CADLo83-HYHN2xt2ggL7Xa9=Lk8FZgiaebM5hFqvFdvhqjJXNCw@mail.gmail.com> In-Reply-To: <4e55153e.Tj16zX3SskfuVesE%perryh@pluto.rain.com> References: <1B4FC0D8-60E6-49DA-BC52-688052C4DA51@langille.org> <20110819232125.GA4965@icarus.home.lan> <B6B0AD0F-A74C-4F2C-88B0-101443D7831A@langille.org> <20110820032438.GA21925@icarus.home.lan> <4774BC00-F32B-4BF4-A955-3728F885CAA1@langille.org> <4E4FF4D6.1090305@os2.kiev.ua> <20110820183456.GA38317@icarus.home.lan> <4e50c931.gCNlQFqn5sVQXXax%perryh@pluto.rain.com> <20110821050051.GA47415@icarus.home.lan> <4e5141dd.mmh6t9R/knnc8Jll%perryh@pluto.rain.com> <4e55153e.Tj16zX3SskfuVesE%perryh@pluto.rain.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24 August 2011 16:14, <perryh@pluto.rain.com> wrote: >> When the specified or calculated rate exceeds 64KB/sec, the >> required sleep interval between 64KB chunks is less than one >> second. =A0Since diskcheckd calculates the interval in whole seconds >> -- because it calls sleep() rather than usleep() or nanosleep() >> -- an interval of less than one second is calculated as zero ... >> I suspect the fix will be to calculate in microseconds, and call >> usleep() instead of sleep(). > > I think I may have this fixed. > > Could one of you try the attached patch? =A0I'm especially interested > to see if this also clears up the issues reported as connected with > gmirror (http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/143566), > since I haven't been able to reproduce that part here. > > Summary of changes: > > * Calculate delays in microseconds, so that delays of less than > =A0one second between reads (needed to implement rates exceeding > =A064KB/sec) do not get rounded down to zero. > > * Fix a reinitialization problem when handling SIGHUP. > > * Additional debug messages (only with -d). > > * Comment and manpage improvememts. > Hi Perry, The changes look good, so if there's no response for a few days I'll commit the changes. Thanks for rescuing the port :) Chris --=20 Chris Rees =A0 =A0 =A0 =A0 =A0| FreeBSD Developer crees@FreeBSD.org =A0 | http://people.freebsd.org/~crees
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-HYHN2xt2ggL7Xa9=Lk8FZgiaebM5hFqvFdvhqjJXNCw>