Re: archive filesystem interface

Riley Williams (rhw@BigFoot.Com)
Wed, 21 Apr 1999 10:54:15 +0100 (GMT)


Hi Alexander.

>> What is the most portable and efficient way to get filename(s)
>> from inode numbers?

> Full scan of filesystem. And it's the only way. Kinda kills the
> idea... Besides, you'll have pretty races between such scan and
> rename(). Raceless way to do it from userland simply doesn't
> exist. From the kernel... It will be equally slow and would take
> mind-boggling amount of locking to prevent races. In effect
> you'll have to stop all namespace-related activity for the
> duration of that operation. And it will not be fast - on a big
> fs it may take tens of seconds for each file.

There's also the fact that any particular inode may easily have
multiple filenames attached to it. After all, that's how hard links
work...

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html

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