From owner-svn-src-head@freebsd.org Tue Mar 21 22:41:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7032D17B40; Tue, 21 Mar 2017 22:41:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6EE41789; Tue, 21 Mar 2017 22:41:38 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2LMfb2E059369; Tue, 21 Mar 2017 22:41:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2LMfbYG059368; Tue, 21 Mar 2017 22:41:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201703212241.v2LMfbYG059368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 Mar 2017 22:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315693 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2017 22:41:39 -0000 Author: cem Date: Tue Mar 21 22:41:37 2017 New Revision: 315693 URL: https://svnweb.freebsd.org/changeset/base/315693 Log: kern_fail: Allow sleeping for more than 2147483/hz seconds Because of integer types, the timeout calculation result was limited to INT_MAX / (1000 * hz) seconds. For systems with hz=10000, this is only 215 seconds. Perform the calculation with 64-bit math to allow sleeping for the full INT_MAX / hz interval (215000 seconds on such hz=10000 systems). Submitted by: Scott Ferris Sponsored by: Dell EMC Isilon Modified: head/sys/kern/kern_fail.c Modified: head/sys/kern/kern_fail.c ============================================================================== --- head/sys/kern/kern_fail.c Tue Mar 21 22:21:29 2017 (r315692) +++ head/sys/kern/kern_fail.c Tue Mar 21 22:41:37 2017 (r315693) @@ -425,7 +425,7 @@ fail_point_sleep(struct fail_point *fp, int timo; /* Convert from millisecs to ticks, rounding up */ - timo = howmany(msecs * hz, 1000); + timo = howmany((int64_t)msecs * hz, 1000L); if (timo > 0) { if (!(fp->fp_flags & FAIL_POINT_USE_TIMEOUT_PATH)) {