Messages in this thread | | | From | Denis Vlasenko <> | Subject | Re: ISO-9660 Rock Ridge gives different links different inums | Date | Fri, 10 Jan 2003 08:34:44 +0200 |
| |
On 10 January 2003 05:34, Peter Chubb wrote: > >> I don't know enough about the ISO9660 standard to be sure what's > >> best to do about this. > > Andrew> Change it to be the offset to the data area, which should be > Andrew> the same for all of them? > > I thought about that, but I'm unsure if there's any way to get from > that offset to the directory information. As far as I can tell, > there's no concept of an inode separate from directory entry on > iso9660 --- the directory entry/entries all contain all the > information that describes a file. Which means that the inumber has > to point to some directory node. > > Preferably, all the inumbers for the same file would point to the > same directory entry; but I can see no easy way to do that. Keeping > an in-memory table for files with multiple links might be the best > way, as there aren't that many on a typical filesystem.
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/
| |