So the real problem is, that MSDOS has _lookup_ semantics that simply dont
fit into Linux internal namespace lookup logic, without special casing.
And we want to delegate _all_ 'string namespace categorization' (lookup)
activity to the VFS layer.
so either we break this model (no way!), or we force MSDOSFS (users ;) to
fit the semantics of Linux. Fortunately there are almost no applications
that rely on exact MSDOS lookup semantics, apart from things that see
MSDOS created physical file archives directly (unzip, rar, arj, tar), or
cross-filesystem tools (cp -R, cpio, tar). The following libc hack i think
provides a working migration path:
- MSDOSFS is 'nonescaping', names leading into MSDOSFS can never leave
- kernel returns -ENONCANONIC from real_lookup(msdos_lookup()) if
the name is noncanonic
- thus libc can iterate back from the end of the string and translate
to canonic form slowly, until -ENONCANONIC vanishes
the above 'backtrack' thing is certainly slow, but safe and guarantees
correctness in the MSDOS-lookup sense, and can clearly go away after some
time, without affecting the main kernel.
any better solution?
-- mingo