Re: Max symlink depth

Frank van Maarseveen (F.vanMaarseveen@inter.NL.net)
Sun, 21 Nov 1999 20:02:54 +0100


On Sun, Nov 21, 1999 at 10:45:09AM -0500, Brandon S. Allbery KF8NH wrote:
> In message <19991121103122.A816@surfsouth.com>, Chad Miller writes:
> +-----
> | Hi there. I'm implementing union-mount, and I find the need to store
> | info on a stack. My question is: I see a good bit of code that could
> | have been recursively written, but prolly intentionally wasn't. Is
> | there a reason, like ``recursion is frowned upon in the kernel?'' Or
> +--->8
>
> "kernel stack is too small" - it fits at the end of 2-page per-process area
> which also holds the task_struct. This is also why the max symlink depth is
> 3 instead of something more common (and useful; 3 causes some grief for us
> when so many things are symlinks into AFS and we use symlinks in AFS to
> "version" software release areas).
iapetus ~/tmp/test ls -l
total 0
-rw-r--r-- 1 fvm sec 0 Nov 21 19:59 0
lrwxrwxrwx 1 fvm sec 1 Nov 21 19:59 1 -> 0
lrwxrwxrwx 1 fvm sec 1 Nov 21 19:59 2 -> 1
lrwxrwxrwx 1 fvm sec 1 Nov 21 19:59 3 -> 2
lrwxrwxrwx 1 fvm sec 1 Nov 21 19:59 4 -> 3
lrwxrwxrwx 1 fvm sec 1 Nov 21 19:59 5 -> 4
lrwxrwxrwx 1 fvm sec 1 Nov 21 19:59 6 -> 5
iapetus ~/tmp/test wc *
0 0 0 0
0 0 0 1
0 0 0 2
0 0 0 3
0 0 0 4
0 0 0 5
wc: 6: Too many levels of symbolic links
0 0 0 total

So it's 5 on 2.2.13 but I must agree: it's somewhat limited. About the recursion
AFAIK there's no fundamental objection, only a practical one being the system
stack size.

-- 
Frank

- 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/