And what will happen on a non-typical filesystem with 1 million hardlinks?
The root of the problem is a fundamental layering violation in
traditional Unix filesystems: inode numbers should NOT be visible
to userspace. Userspace just needs a way to tell hardlinks from separate
files, that's all. Exposing inumbers does that, but creates tons
of problems for filesystems which do NOT have such a concept.
There is at least one way to redesign it:
* provide hash number instead of an inumber for each file
with the following semantics:
- hardlinks ALWAYS have equal hash numbers
- different files MAY have equal hash numbers (but rarely)
* provide is_hardlink(file1,file2) system call
But this will cause very long migration period (~10 years?)
and incompatibilities with other Unix variants...
-- vda - 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/