xfs
[Top] [All Lists]

Re: [NEWBIE] Why aren't directory mtimes updated like other filesystems?

To: "Kevin P. Fleming" <kpfleming@xxxxxxx>
Subject: Re: [NEWBIE] Why aren't directory mtimes updated like other filesystems?
From: Steve Lord <lord@xxxxxxx>
Date: 13 Mar 2003 14:10:57 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <3E70E46A.20901@cox.net>
Organization:
References: <3E70E46A.20901@cox.net>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Thu, 2003-03-13 at 14:04, Kevin P. Fleming wrote:
> I've just set up my first XFS system, using kernel 2.5.64-bk7. So far so 
> good, 
> got three XFS volumes on an LVM2 volume group and everything seems to be 
> working 
> well.
> 
> However, I noticed a behavior that I didn't expect. I've googled, and checked 
> the FAQ, and checked the XFS Bugzilla and I haven't come across it. On my XFS 
> filesystems, when I make changes within a directory (create/remove 
> subdirectory, 
> create/remove/touch files), the mtime (modification time) of the parent 
> directory is not updated. On my other filesystems (ext2 and ext3) it is. I am 
> working on a Makefile that depends on this behavior, so I'm wondering if this 
> is 
> a bug in XFS, or if updating the parent directory's mtime is not mandataory 
> Unix/POSIX behavior?

Well, the code is there to do this, and, when I modify a directory it
does change the times:

jen{lord}: stat .
  File: "."
  Size: 4096            Blocks: 8          IO Block: 4096   Directory
Device: 804h/2052d      Inode: 131         Links: 28   
Access: (0755/drwxr-xr-x)  Uid: (  858/    lord)   Gid: ( 1015/ network)
Access: Thu Mar 13 14:08:25 2003
Modify: Thu Mar 13 10:50:35 2003
Change: Thu Mar 13 10:50:35 2003

jen{lord}: touch foo
jen{lord}:  stat .
  File: "."
  Size: 4096            Blocks: 8          IO Block: 4096   Directory
Device: 804h/2052d      Inode: 131         Links: 28   
Access: (0755/drwxr-xr-x)  Uid: (  858/    lord)   Gid: ( 1015/ network)
Access: Thu Mar 13 14:08:25 2003
Modify: Thu Mar 13 14:10:28 2003
Change: Thu Mar 13 14:10:28 2003

Steve

-- 

Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx


<Prev in Thread] Current Thread [Next in Thread>