From mboxrd@z Thu Jan 1 00:00:00 1970 From: Werner Almesberger Subject: Re: [RFC] set MS_NOATIME on FAT ? Date: Tue, 15 Mar 2005 08:04:07 -0300 Message-ID: <20050315080407.T12802@almesberger.net> References: <20050314232059.R12802@almesberger.net> <871xahwoik.fsf@devron.myhome.or.jp> <20050315011820.S12802@almesberger.net> <87wts9mr7s.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Received: from host.almesberger.net ([204.10.140.10]:6664 "EHLO host.almesberger.net") by vger.kernel.org with ESMTP id S261730AbVCOLFl (ORCPT ); Tue, 15 Mar 2005 06:05:41 -0500 To: OGAWA Hirofumi Content-Disposition: inline In-Reply-To: <87wts9mr7s.fsf@devron.myhome.or.jp>; from hirofumi@mail.parknet.co.jp on Tue, Mar 15, 2005 at 02:08:07PM +0900 Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org OGAWA Hirofumi wrote: > Right. However, if you need NOATIME, you can set it with mount > options. Yes, of course. It just seems clearer to me to avoid the useless "inode" writes by default. > And I think, we just need to fix ->adate, no need to change > default options. In the case of non-VFAT, there's also the issue that pretending to support atime causes atime to jump back and forth unpredictably, depending on when the inode is evicted from memory. (And the low adate resolution means that even VFAT will have a similar problem.) But I guess if nobody complained in the last twelve or so years, we're in no hurry to fix that ;-) (And in case we are, patch below.) Thanks, - Werner ---------------------------------- cut here ----------------------------------- Signed-off-by: Werner Almesberger --- linux-2.6.11-orig/fs/fat/inode.c Wed Mar 2 04:38:08 2005 +++ linux-2.6.11/fs/fat/inode.c Tue Mar 15 07:35:06 2005 @@ -414,6 +484,8 @@ static void __exit fat_destroy_inodecach static int fat_remount(struct super_block *sb, int *flags, char *data) { *flags |= MS_NODIRATIME; + if (!MSDOS_SB(sb)->options.isvfat) + *flags |= MS_NOATIME; return 0; } @@ -1059,6 +1131,8 @@ int fat_fill_super(struct super_block *s memset(sbi, 0, sizeof(struct msdos_sb_info)); sb->s_flags |= MS_NODIRATIME; + if (!isvfat) + sb->s_flags |= MS_NOATIME; sb->s_magic = MSDOS_SUPER_MAGIC; sb->s_op = &fat_sops; sb->s_export_op = &fat_export_ops; -- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / /_http://www.almesberger.net/____________________________________________/