Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Feb 2011 14:28:50 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/cddl/compat/opensolaris/sys types.h
Message-ID:  <201102011429.p11ET8x6007073@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
mm          2011-02-01 14:28:50 UTC

  FreeBSD src repository

  Modified files:
    sys/cddl/compat/opensolaris/sys types.h 
  Log:
  SVN rev 218169 on 2011-02-01 14:28:50Z by mm
  
  For ZFS, 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@
  MFC after:      1 week
  
  Revision  Changes    Path
  1.7       +4 -0      src/sys/cddl/compat/opensolaris/sys/types.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102011429.p11ET8x6007073>