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

dmeyer@dmeyer.net
Fri, 14 Dec 2001 10:06:38 -0500


In article <3C19DE41.6000507@namesys.com> 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
dmeyer@dmeyer.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/