From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Patrick J. LoPresti" Subject: Re: Proposal: Use hi-res clock for file timestamps Date: Tue, 17 Aug 2010 12:34:58 -0700 Message-ID: References: <87aaolwar8.fsf@basil.nowhere.org> <20100817174134.GA23176@fieldses.org> <20100817182920.GD18161@basil.fritz.box> <20100817190447.GA28049@fieldses.org> <20100817203941.729830b7@lxorguk.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "J. Bruce Fields" , Andi Kleen , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel To: Alan Cox Return-path: In-Reply-To: <20100817203941.729830b7-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Aug 17, 2010 at 12:39 PM, Alan Cox w= rote: > =A0 =A0 =A0 =A0if (time_now =3D=3D time_last) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return { time_last , ++ct }; > =A0 =A0 =A0 =A0else { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ct =3D 0; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0time_last =3D time_now > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return { time_last , 0 }; > =A0 =A0 =A0 =A0} > > providing it is done with the same 'ct' across the fs and you can't d= o > enough ops/second to wrap the nanosecs - which should be fine for now= , > your ordering is still safe is it not ? Yes, that would work. Assuming you use atomic counters, else there is a risk of the visible time ticking backwards. It seems like a lot of effort just to avoid having accurate timestamps on your files, though. I am having trouble seeing why this is a better idea than a simple mount option to obtain decent resolution timestamps. (Not that we can't have both...) Is there any objection to the mount option I am proposing? =46or the Nth time, I am willing to produce and test the patch, but not if there is zero chance of it being accepted. - Pat -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html