[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1H2qhP-0007qc-00@dorka.pomaz.szeredi.hu>
Date: Fri, 05 Jan 2007 16:09:39 +0100
From: Miklos Szeredi <miklos@...redi.hu>
To: mikulas@...ax.karlin.mff.cuni.cz
CC: pavel@....cz, matthew@....cx, bhalevy@...asas.com,
arjan@...radead.org, jaharkes@...cmu.edu,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
nfsv4@...f.org
Subject: Re: Finding hardlinks
> And does it matter? If you rename a file, tar might skip it no matter of
> hardlink detection (if readdir races with rename, you can read none of the
> names of file, one or both --- all these are possible).
>
> If you have "dir1/a" hardlinked to "dir1/b" and while tar runs you delete
> both "a" and "b" and create totally new files "dir2/c" linked to "dir2/d",
> tar might hardlink both "c" and "d" to "a" and "b".
>
> No one guarantees you sane result of tar or cp -a while changing the tree.
> I don't see how is_samefile() could make it worse.
There are several cases where changing the tree doesn't affect the
correctness of the tar or cp -a result. In some of these cases using
samefile() instead of st_ino _will_ result in a corrupted result.
Generally samefile() is _weaker_ than the st_ino interface in
comparing the identity of two files without using massive amounts of
memory. You're searching for a better solution, not one that is
broken in a different way, aren't you?
Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists