From owner-freebsd-chat@FreeBSD.ORG Sun Aug 19 15:36:48 2007 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E834516A420 for ; Sun, 19 Aug 2007 15:36:48 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.233]) by mx1.freebsd.org (Postfix) with ESMTP id 5912A13C4A3 for ; Sun, 19 Aug 2007 15:36:48 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: by hu-out-0506.google.com with SMTP id 28so1169428hub for ; Sun, 19 Aug 2007 08:36:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=N2OO0r/Xac232fz9VvW6nVEAUMN5d8fnx0m8EQhgm+aFwfklVX6NhOLwhrtyaus2O0U3NxPIpRyY+4Z1iHukrbrrDgSEOEFutZ9pIyVUDE3cqu4hndOs8cKpn6etEzl8fHtRshgP4tJHnsVxSXI/ZU/RpFhuoVpJPdJmvyJTdF4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=IrrGA+zHcUuK07+HssNfZAhFJfYOdUUQGCun7z85lqjqAGg38zgIIu4p7i4SKS4DdE83Urm1aw1bVu83oW+ecPdP6fJYMcPKDguZhXW7NOwg7/DQ2ilPRQRbTw/5uBi2zn0E2i7oKQ1DvkoJRRnITvPZAUExkSnkMvb8omSiAE8= Received: by 10.86.98.18 with SMTP id v18mr3766067fgb.1187537806265; Sun, 19 Aug 2007 08:36:46 -0700 (PDT) Received: from ?192.168.123.111? ( [84.0.102.56]) by mx.google.com with ESMTPS id d13sm7876325fka.2007.08.19.08.36.44 (version=SSLv3 cipher=RC4-MD5); Sun, 19 Aug 2007 08:36:45 -0700 (PDT) Message-ID: <46C863A6.5010404@gmail.com> Date: Sun, 19 Aug 2007 17:37:10 +0200 From: deeptech71@gmail.com User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: freebsd-chat@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: filesystem timestamps and their usage X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 15:36:49 -0000 Let's talk about file system timestamps. What kind of timestamps are there currently, and what are they used for? (or what new timestamps would be needed/beneficial, or whatever.) Currently I can think of only two: 1. data_time: The last time the file was written to. 2. file_time: The last time the file was moved or written to. If a directory is moved, all files within are also time-updated. It should be considered invalid, if data_time > file_time, but can happen if, for example, a file is copied from somewhere, like an FTP server, and ?therefore not be automatically corrected? (it does not imply filesystem corruption). Some basic usage for compiling. Here's func.x86's dependency tree: common.h } (func.c includes func.h, which includes common.h) func.h } func.c } -> func.o } (func.x86 is generated } -> func.x86 from func.o and main.o) common.h } -> main.o } main.h } main.c } (main.c includes main.h, which includes common.h) We have compiled everything already. Now let's do something. As a requirement, the data_time of a derived file must be later in time, for it to be considered up to date. That is, if I edit func.h, it's timestamp will be higher than func.c's timestamp, meaning that I have to recompile func.c, and link the executable. Generally, a file's (like func.x86's) time must be higher than every other file it depends on (func.o, main.o). Next, if I replace common.h with a different file (because I want to recompile with someone else's common.h), the data_time of common.h may be lower than main.h. So all the data_time and file_time of main.o and func.o must be higher than the ones of common.h. Generally both of the file's times should be higher than any of its dependencies' times. If a bad time (data_time > file_time) is detected, and its file depends on something, it's remade. If it does not depend on anything, I don't know, maybe the compiler should warning or use the file_time only. If I want to replace the .o (wtf for?), then I'll have to build, replace, then link only. OK that would be the basic usage of these two timestamps in compiling. If I'm wrong, or something would be more practical maybe, please tell. And, what about other timestamps? THX