From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] add some notes on file_update_time Date: Fri, 11 Nov 2005 00:47:33 +0100 Message-ID: <20051110234733.GA19693@lst.de> References: <20051110233818.GA19368@lst.de> <20051110234527.GC19418@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , akpm@osdl.org, linux-fsdevel@vger.kernel.org Return-path: Received: from verein.lst.de ([213.95.11.210]:62685 "EHLO mail.lst.de") by vger.kernel.org with ESMTP id S1750757AbVKJXrp (ORCPT ); Thu, 10 Nov 2005 18:47:45 -0500 To: Anton Altaparmakov Content-Disposition: inline In-Reply-To: <20051110234527.GC19418@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Nov 11, 2005 at 12:45:27AM +0100, Christoph Hellwig wrote: > > Nice explanation except for the last sentence. Surely you do not expect > > filesystem drivers to call notify_change()? I thought you told me that I > > should be setting the c/mtime directly, rather than using a function, so > > now you are going back on that? Or am I simply misunderstanding the > > sentence completely? I apologize if that is the case... > > this was meant for non-fs callers. but to be there's no reason > why non-fs callers should look at this function in the first time. > > The updated patch below just drop the sentence. we might want to write > up rules on c/mtime updates somewhere, but that's really not related to > file_update_time. And here's another update, as Nathan Scott found a small typo: Index: linux-2.6/fs/inode.c =================================================================== --- linux-2.6.orig/fs/inode.c 2005-11-10 16:02:18.000000000 +0100 +++ linux-2.6/fs/inode.c 2005-11-10 16:05:55.000000000 +0100 @@ -1208,7 +1208,11 @@ * @file: file accessed * * Update the mtime and ctime members of an inode and mark the inode - * for writeback. + * for writeback. Note that this function is meant exclusively for + * usage in the file write path of filesystems, and filesystems may + * choose to explicitly ignore update via this function with the + * S_NOCTIME inode flag, e.g. for network filesystem where these + * timestamps are handled by the server. */ void file_update_time(struct file *file)