[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0612231458060.5182@artax.karlin.mff.cuni.cz>
Date: Sat, 23 Dec 2006 15:00:18 +0100 (CET)
From: Mikulas Patocka <mikulas@...ax.karlin.mff.cuni.cz>
To: Arjan van de Ven <arjan@...radead.org>
Cc: Jan Harkes <jaharkes@...cmu.edu>,
Miklos Szeredi <miklos@...redi.hu>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: Finding hardlinks
>> If user (or script) doesn't specify that flag, it doesn't help. I think
>> the best solution for these filesystems would be either to add new syscall
>> int is_hardlink(char *filename1, char *filename2)
>> (but I know adding syscall bloat may be objectionable)
>
> it's also the wrong api; the filenames may have been changed under you
> just as you return from this call, so it really is a
> "was_hardlink_at_some_point()" as you specify it.
> If you make it work on fd's.. it has a chance at least.
Yes, but it doesn't matter --- if the tree changes under "cp -a" command,
no one guarantees you what you get.
int fis_hardlink(int handle1, int handle 2);
Is another possibility but it can't detect hardlinked symlinks.
Mikulas
-
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