From owner-svn-src-all@FreeBSD.ORG Tue Feb 8 08:44:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BD6B1065673; Tue, 8 Feb 2011 08:44:09 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC9CD8FC14; Tue, 8 Feb 2011 08:44:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p188i8iJ039221; Tue, 8 Feb 2011 08:44:08 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p188i8Tr039219; Tue, 8 Feb 2011 08:44:08 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201102080844.p188i8Tr039219@svn.freebsd.org> From: Martin Matuska Date: Tue, 8 Feb 2011 08:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218429 - stable/8/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2011 08:44:09 -0000 Author: mm Date: Tue Feb 8 08:44:08 2011 New Revision: 218429 URL: http://svn.freebsd.org/changeset/base/218429 Log: MFC r218180 (= fixed r218169): For the ZFS kernel module, change the type of clock_t to int64_t. The clock_t type in OpenSolaris is long (int64_t on amd64). On FreeBSD clock_t is int32_t. The clock_t type is used in several places in the ZFS code to store system uptime in milliseconds ("seconds * hz"). With hz=1000 we have a 32-bit integer overflow in 24 days, 20 hours, 31 minutes and 23.648 seconds. This has a user reported negative impact on l2arc_feed_thread() and may cause unexpected results from other functions using clock_t. Reported by: Artem Belevich on freebsd-fs@ Modified: stable/8/sys/cddl/compat/opensolaris/sys/types.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/sys/types.h ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/sys/types.h Tue Feb 8 04:48:53 2011 (r218428) +++ stable/8/sys/cddl/compat/opensolaris/sys/types.h Tue Feb 8 08:44:08 2011 (r218429) @@ -34,6 +34,12 @@ */ #include + +#ifdef _KERNEL +typedef int64_t clock_t; +#define _CLOCK_T_DECLARED +#endif + #include_next #define MAXNAMELEN 256