Messages in this thread | | | Date | Sun, 3 Jun 2001 01:54:43 +0200 (MET DST) | From | Andries.Brouwer@cwi ... | Subject | symlink_prefix |
| |
This evening I needed to work on a filesystem of a non-Linux OS, full of absolute symlinks. After mounting the fs on /mnt, each symlink pointing to /foo/bar in that filesystem should be regarded as pointing to /mnt/foo/bar.
Since doing ls -ld on every component of every pathname was far too slow, I made a small kernel wart, where a mount option -o symlink_prefix=/pathname would cause /pathname to be prepended in front of every absolute symlink in the given filesystem (when the symlink is followed). That works satisfactorily.
Remain the questions: (i) is there already a mechanism that would achieve this? (ii) if not, do we want something like this in the kernel?
There is already a vaguely similar (and much uglier) wart, namely that of "altroot". It is really ugly - requires a path set at kernel compile time. And the scope is different. Instead of all processes and a single filesystem and symlinks only, altroot affects a single process and all filesystems and all paths.
I do not immediately see a common generalization of these two.
Andries
- 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/
| |