]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r218180 (= fixed r218169):
authormm <mm@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 8 Feb 2011 08:44:08 +0000 (08:44 +0000)
committermm <mm@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 8 Feb 2011 08:44:08 +0000 (08:44 +0000)
commit2178da99e1ba5601a05dfc76d53c2498f5b98b57
tree47dadef90f67dade3e8daab86a9d6fc0d9330644
parent8ee5359c2a3b02a4bfd53a441f730c9fded64d97
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 <fbsdlist@src.cx> on freebsd-fs@

git-svn-id: svn://svn.freebsd.org/base/stable/8@218429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/compat/opensolaris/sys/types.h