From owner-svn-src-stable-8@FreeBSD.ORG Thu Feb 25 00:46:51 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA1491065673; Thu, 25 Feb 2010 00:46:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A93FB8FC15; Thu, 25 Feb 2010 00:46:51 +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 o1P0kpsY053825; Thu, 25 Feb 2010 00:46:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1P0kpoG053823; Thu, 25 Feb 2010 00:46:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201002250046.o1P0kpoG053823@svn.freebsd.org> From: Xin LI Date: Thu, 25 Feb 2010 00:46:51 +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: r204295 - stable/8/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2010 00:46:51 -0000 Author: delphij Date: Thu Feb 25 00:46:51 2010 New Revision: 204295 URL: http://svn.freebsd.org/changeset/base/204295 Log: MFC r202964: On FreeBSD, time_t is 64-bit for all platforms except i386 and powerpc, where the type is 32-bit. ZFS can handle 64-bit timestamp internally but zfs_setattr() would check if the time value can fit, we change the checking macros to match 64-bit timestamp if the platform supports it. This change has some downsides like, while you can import zfs on 32-bit platforms, the timestamp would overflow if they are out of the range. This fixes the Y2.038K issue on platforms using 64-bit timestamps. Reviewed by: pjd Modified: stable/8/sys/cddl/compat/opensolaris/sys/time.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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/sys/time.h ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/sys/time.h Wed Feb 24 23:00:16 2010 (r204294) +++ stable/8/sys/cddl/compat/opensolaris/sys/time.h Thu Feb 25 00:46:51 2010 (r204295) @@ -40,8 +40,13 @@ typedef longlong_t hrtime_t; #define LBOLT ((gethrtime() * hz) / NANOSEC) +#if defined(__i386__) || defined(__powerpc__) #define TIMESPEC_OVERFLOW(ts) \ ((ts)->tv_sec < INT32_MIN || (ts)->tv_sec > INT32_MAX) +#else +#define TIMESPEC_OVERFLOW(ts) \ + ((ts)->tv_sec < INT64_MIN || (ts)->tv_sec > INT64_MAX) +#endif #ifdef _KERNEL #define lbolt64 (int64_t)(LBOLT)