Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
Re: [opensuse] mv and cpio have new behavior. How do I get the old back?
  • From: Boyd Lynn Gerber <gerberb@xxxxxxxxx>
  • Date: Tue, 25 Mar 2008 20:39:59 -0600
  • Message-id: <Pine.LNX.4.64.0803252035360.26263@xxxxxxxxxxxxxxx>
On Wed, 26 Mar 2008, Anders Johansson wrote:
On Tue, 2008-03-25 at 20:26 -0600, Boyd Lynn Gerber wrote:
The directories *are* changing. Specifically, the .. dentry is changed
to point to the inode of the new parent directory. In your ls output I'm
willing to bet that you moved the directory to another partition, which
means your directory got a new inode number, which in turn means all ..
dentries in all subdirectories had to be updated

So to my mind it is correct that the mtime gets updated. I see it more
as a problem with ext that it doesn't get updated there

They did not change partitions. They were all in /home/zenez/ This
directory was getting to many directories to follow. I did the
following

mkdir etc-new
mv etc etc.* etc-new/
mv etc-new etc

The above was the result.

Ah, ok, I thought you were showing the contents of the moved directory.

Well then my theory above still holds. All directories had to have an
updated .. dentry, which means they were modified

if (new_parent && src_is_directory) {
/*
* Rewrite the ".." entry to point to the new
* directory.
*/
error = xfs_dir_replace(tp, src_ip, "..", 2,
target_dp->i_ino,
&first_block, &free_list,
spaceres);
ASSERT(error != EEXIST);
if (error)
goto abort_return;
xfs_ichgtime(src_ip, XFS_ICHGTIME_MOD |
XFS_ICHGTIME_CHG);

is the code in xfs that does it. So if it gets a new .., update MOD
(mtime) and CHG (ctime). The corresponding code in ext3 is

old_inode->i_ctime = CURRENT_TIME_SEC;

so it only changes the ctime.

In other words, it is a conscious choice by the xfs programmers, and
while it's unfortunate that the file systems behave differently, I still
think xfs got it right here, because the directory is modified

Thanks, that explains it. I should have used ext3 or reiser. The problem
is I had to reboot a machine with 10.2 and 500 GB drives. ext3 has been
doing it's fsck check for 3 hours. I really can not be without my
machines for many hours for the over 3 month fsck check. I have gone back
to reiser on most systems. I guess I have been lucky. I have never had a
data loss(Knock on wood) with reiser. I just do not have 2 more 1TB
drives to change the XFS to reiser. The above makes things very clear.

Thanks,

--
Boyd Gerber <gerberb@xxxxxxxxx>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups