From owner-freebsd-arch@FreeBSD.ORG Wed Dec 17 12:21:47 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5761D7B4 for ; Wed, 17 Dec 2014 12:21:47 +0000 (UTC) Received: from mailrelay10.public.one.com (mailrelay10.public.one.com [195.47.247.78]) (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 A3DCF250 for ; Wed, 17 Dec 2014 12:21:45 +0000 (UTC) X-HalOne-Cookie: 30715931dcc5ddc580c00f6ae174a86bfde09d1d X-HalOne-ID: a7541f4c-85cb-11e4-9705-b82a72d06996 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cederstrand.dk; s=20140924; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=pcFm7KlPDbays1EniXBkjX5SXuISxtOsazbyRGArk7s=; b=NKm+oUAgdJL0LsHQMSTyMnN51GHraBkSWIicbAKahfVzaCXh9XSwsQZHywbyasQYR/AIim0b4NUKm /Q0755N2qH5iS6fhyz/tx8EQw3RxMEjHRGuKEWwuu1vrw94EdSkDNNOMPCQPhjRK2l2Y+yJls8zDjH avqxsisGLMe/lGE4= Received: from [192.168.1.58] (unknown [217.157.7.221]) by smtpfilter3.public.one.com (Halon Mail Gateway) with ESMTPSA; Wed, 17 Dec 2014 09:04:05 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: Change default VFS timestamp precision? From: Erik Cederstrand In-Reply-To: <201412161348.41219.jhb@freebsd.org> Date: Wed, 17 Dec 2014 10:04:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <1087E8D0-4B2F-4941-BDCE-3D50264D7FBB@cederstrand.dk> References: <201412161348.41219.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1993) Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2014 12:21:47 -0000 > Den 16/12/2014 kl. 19.48 skrev John Baldwin : >=20 > We still ship with vfs.timestamp_precision=3D0 by default meaning that = VFS=20 > timestamps have a granularity of one second. It is not unusual on = modern=20 > systems for multiple updates to a file or directory to occur within a = single=20 > second (and thus share the same effective timestamp). This can break = things=20 > that depend on timestamps to know when something has changed or is = stale (such=20 > as make(1) or NFS clients). Mistaking timestamps for uniqueness is really a design error of the = consumer. Changing granularity to milliseconds will diminish the = problem, but also create harder-to-debug problems when multiple updates = do happen in the same millisecond. Is there no other way than timestamps = to find out if a file has changed (apart from md5 which is too = expensive)? Erik=