kernel-ark/fs/ext2
Jan Kara 39fe7557b4 ext2: Do not update mtime of a moved directory
One of our users is complaining that his backup tool is upset on ext2
(while it's happy on ext3, xfs, ...) because of the mtime change.

The problem is:

    mkdir foo
    mkdir bar
    mkdir foo/a

Now under ext2:
    mv foo/a foo/b

changes mtime of 'foo/a' (foo/b after the move).  That does not really
make sense and it does not happen under any other filesystem I've seen.

More complicated is:
    mv foo/a bar/a

This changes mtime of foo/a (bar/a after the move) and it makes some
sense since we had to update parent directory pointer of foo/a.  But
again, no other filesystem does this.  So after some thoughts I'd vote
for consistency and change ext2 to behave the same as other filesystems.

Do not update mtime of a moved directory.  Specs don't say anything
about it (neither that it should, nor that it should not be updated) and
other common filesystems (ext3, ext4, xfs, reiserfs, fat, ...) don't do
it.  So let's become more consistent.

Spotted by ronny.pretzsch@dfs.de, initial fix by Jörn Engel.

Reported-by: <ronny.pretzsch@dfs.de>
Cc: <hare@suse.de>
Cc: Jörn Engel <joern@logfs.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-18 13:03:44 -07:00
..
acl.c New helper - current_umask() 2009-03-31 23:00:26 -04:00
acl.h [PATCH] sanitize ->permission() prototype 2008-07-26 20:53:14 -04:00
balloc.c ext2: Use lowercase names of quota functions 2009-03-26 02:18:36 +01:00
dir.c ext2: Do not update mtime of a moved directory 2009-06-18 13:03:44 -07:00
ext2.h ext2: Do not update mtime of a moved directory 2009-06-18 13:03:44 -07:00
file.c switch ext2 to simple_fsync() 2009-06-11 21:36:12 -04:00
ialloc.c ext2: Use lowercase names of quota functions 2009-03-26 02:18:36 +01:00
inode.c switch ext2 to simple_fsync() 2009-06-11 21:36:12 -04:00
ioctl.c ext2: tighten restrictions on inode flags 2009-01-08 08:31:00 -08:00
Kconfig fs/Kconfig: move ext2, ext3, ext4, JBD, JBD2 out 2008-10-20 11:43:59 -07:00
Makefile switch ext2 to simple_fsync() 2009-06-11 21:36:12 -04:00
namei.c ext2: Do not update mtime of a moved directory 2009-06-18 13:03:44 -07:00
super.c ext2: add ->sync_fs 2009-06-11 21:36:15 -04:00
symlink.c [PATCH] mark struct inode_operations const 1 2007-02-12 09:48:46 -08:00
xattr_security.c ext2: remove double definitions of xattr macros 2008-07-25 10:53:31 -07:00
xattr_trusted.c ext2: remove double definitions of xattr macros 2008-07-25 10:53:31 -07:00
xattr_user.c ext2: remove double definitions of xattr macros 2008-07-25 10:53:31 -07:00
xattr.c ext2: Use lowercase names of quota functions 2009-03-26 02:18:36 +01:00
xattr.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
xip.c [PATCH] move block_device_operations to blkdev.h 2008-10-21 07:47:20 -04:00
xip.h xip: support non-struct page backed memory 2008-04-28 08:58:23 -07:00