2001-12-14 15:07:13

by dmeyer

[permalink] [raw]
Subject: Re: reiser4 (was Re: [PATCH] Revised extended attributes interface)

In article <[email protected]> you write:
> Brad Boyer wrote:
> >In particular, the files in the snapshot keep
> >the same inode number as the actual file. Just remember that clever
> >solutions that almost fit the traditional model can have strange
> >results over time.
>
> Can you detail the problem?

Anything that uses something like file1.st_dev==file2.st_dev &&
file1.st_ino==file2.st_ino to decide if two filenames point to the
same file can get terribly confused. For example,

$ ls -li .snapshot/hourly.0/.zshrc .zshrc
1411878 -rw-r--r-- 1 1247 Mar 19 2001 .snapshot/hourly.0/.zshrc
1411878 -rw-r--r-- 1 1248 Dec 14 09:51 .zshrc

Clearly, the file has been modified since the hourly.0 snapshot; however

$ cp .snapshot/hourly.0/.zshrc .zshrc
cp: `.snapshot/hourly.0/.zshrc' and `.zshrc' are the same file

you can't copy the snapshot on top of the current version, since they
have the same inode number. A somewhat contrived example, perhaps,
but I have been bitten by something similar in the real world. One of
the things I would like to be able to do with a snapshot is to open a
file in emacs, open a snapshot in another window, and compare the two
files with ediff. And you can't; emacs treats the original and the
snapshot as if they were the same file - just like cp does - even
though the file contents are different.

--
Dave Meyer
[email protected]


2001-12-14 21:24:17

by Bernd Eckenfels

[permalink] [raw]
Subject: Re: reiser4 (was Re: [PATCH] Revised extended attributes interface)

In article <[email protected]> you wrote:
> Clearly, the file has been modified since the hourly.0 snapshot; however

What kind of snapshot software are u using here? lvm?

Greetings
Bernd