From owner-freebsd-stable@FreeBSD.ORG Wed Aug 31 11:44:27 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C6CC106564A; Wed, 31 Aug 2011 11:44:27 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id E8F158FC08; Wed, 31 Aug 2011 11:44:26 +0000 (UTC) Received: by iadx2 with SMTP id x2so922851iad.13 for ; Wed, 31 Aug 2011 04:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=8TLjnqzLghpuR/GSkk/gL9tKEfBz1jzn2d3qn6tTeZc=; b=iuQP/aYjvR8/IdxigFnk+dyruyLDdk5y86qnfCd7hx4CQ6PNkXoykNaSeHxlxyzbZl k0ndlH9Yt5zYrJei2718asIi4R4jAx1WuOH0YSTsHdVYp7nDBTlLlw3Y+8da2iFdGbFF Mll7HXFO8hcQ7A1R86WCZSdwSKsVUfTn20Ahg= Received: by 10.231.26.68 with SMTP id d4mr576337ibc.66.1314791066113; Wed, 31 Aug 2011 04:44:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.61.148 with HTTP; Wed, 31 Aug 2011 04:43:56 -0700 (PDT) In-Reply-To: References: <1B4FC0D8-60E6-49DA-BC52-688052C4DA51@langille.org> <20110819232125.GA4965@icarus.home.lan> <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> From: Chris Rees Date: Wed, 31 Aug 2011 12:43:56 +0100 Message-ID: To: perryh@pluto.rain.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 11:44:27 -0000 On 25 August 2011 18:54, Chris Rees wrote: > On 24 August 2011 16:14, =A0 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 :) > Committed. Thanks! --=20 Chris Rees =A0 =A0 =A0 =A0 =A0| FreeBSD Developer crees@FreeBSD.org =A0 | http://people.freebsd.org/~crees