Messages in this thread | | | Date | Sat, 9 Jan 1999 00:30:38 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [PATCH] Re: ext2fs problem with rename() system call |
| |
On Sat, 9 Jan 1999, Jamie Lokier wrote: > > Not having a POSIX.1 spec, I assumed the more intuitive semantics would > be right... The POSIX-specified behaviour still seems weird to me, but > we must stick to it.
They are almost certainly just due to the fact that it is really hard under some UNIX filesystems to be able to distinguish between two filenames that have the same inode.
I know, you could look at the filename, but even that is actually _really_ hard:
mv ../a /home/user/17/a
where "a" has the same inode. You can't tell by looking whether the two files are the same - they _may_ be depending on what the cwd happens to be.
Obviously the kernel knows the cwd, but even then there may be nasty aliasing issues etc.
I think it's just an old and strange special case that POSIX just codified: not because it made sense, but because that was how UNIX works.
> Are you telling me that > > rename("a", "b") = 0 > lstat("a") = 0 > > make sense? ;-)
I don't think anybody really thinks it makes sense, no.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |