lkml.org 
[lkml]   [1996]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Take II] Eliminating symlink recursion
On Tue, 18 Jun 1996, Kjetil Torgrim Homme wrote:

> Excuse me, I do not understand why this logic is useful.

> Since you put in a threshold (and I think you were right in adding
> it), you can not make arbitrarily complex, but correct webs of
> symlinks. So you lose the generality you had before.

Not entirely, the new limit can be changed or even disabled at compile
time, presumably by the sys admin.

> So, the benefit is then that you can detect loops before the threshold
> is reached. However, it looks like the overheads are very high, and I
> would be surprised if it was a win even for the simple case (which
> gives the greatest gain).

Well, given the linear search I use to find duplicates, I would expect
that resolving a pathname to an inode is O(n^3), where n is the number of
symlinks that need to be followed. This could be improved, I suppose.
Worst-case memory requirements, however, are O(n).

Marc.

+----------------------------------+-----------------------------------+
| Marc Aurele La France | work: 1-403-492-9310 |
| Computing and Network Services | fax: 1-403-492-1729 |
| 352 General Services Building | email: tsi@ualberta.ca |
| University of Alberta +-----------------------------------+
| Edmonton, Alberta | |
| T6G 2H1 | Standard disclaimers apply |
| CANADA | |
+----------------------------------+-----------------------------------+




\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.041 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site