Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422800AbXBUSvK (ORCPT ); Wed, 21 Feb 2007 13:51:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422797AbXBUSvK (ORCPT ); Wed, 21 Feb 2007 13:51:10 -0500 Received: from mx1.redhat.com ([66.187.233.31]:36660 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422800AbXBUSvG (ORCPT ); Wed, 21 Feb 2007 13:51:06 -0500 Message-ID: <45DC9466.5020508@redhat.com> Date: Wed, 21 Feb 2007 13:50:14 -0500 From: Peter Staubach User-Agent: Thunderbird 1.5.0.9 (X11/20061215) MIME-Version: 1.0 To: Trond Myklebust CC: Miklos Szeredi , akpm@linux-foundation.org, hugh@veritas.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] update ctime and mtime for mmaped write References: <1172081562.9108.1.camel@heimdal.trondhjem.org> <1172083004.9108.6.camel@heimdal.trondhjem.org> In-Reply-To: <1172083004.9108.6.camel@heimdal.trondhjem.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1310 Lines: 35 Trond Myklebust wrote: > On Wed, 2007-02-21 at 19:28 +0100, Miklos Szeredi wrote: > >>>> This flag is checked in msync() and __fput(), and if set, the file >>>> times are updated and the flag is cleared >>>> >>> Why not also check inside vfs_getattr? >>> >> This is the minimum, that the standard asks for. >> >> Note, your porposal would touch the times in vfs_getattr(), which >> means, that the modification times would depend on the time of the >> last stat() call, which is not really right, though it would still be >> conforming. >> >> It is much saner, if the modification time is always the time of the >> last write() or msync(). >> > > I disagree. The above doesn't allow a program like 'make' to discover > whether or not the file has changed by simply calling stat(). Instead, > you're forcing a call to msync()+stat(). Right, but that's what the specification specifies. The file times for mmap'd files are not maintained as tightly as they are for files which are being modified via write(2). Rightly or wrongly. ps - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/