Re: ReiserFS patch for updating ctimes of renamed files

From: Jamie Lokier
Date: Tue Oct 14 2003 - 04:29:57 EST


jw schultz wrote:
> Of course if i had designed it in the first place with the
> filesystem semantics that we have now there might be no
> rename system call. Renames would be done by link(oldpath,
> newpath); unlink(oldpath); A sequence that would cause
> ctime to change as a result of nlink changes. A sequence
> that might be appropriate in some cases even inside the
> filesystem code.

Once upon a time, that's how renames were always done.

The rename() system call was added because (a) it provides the
additional atomicity semantic, which link+unlink does not; (b) it is
useful to allow directory renames, but directory hard links are
dangerous so not allowed any more.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/