Subject: Re: funlink() for fun!
To: Greywolf <firstname.lastname@example.org>
From: Greg A. Woods <email@example.com>
Date: 07/10/2003 12:35:37
[ On Wednesday, July 9, 2003 at 13:00:03 (-0700), Greywolf wrote: ]
> Subject: Re: POSIX shm_open() vs. mmap(MAP_ANON|MAP_SHARED)....
> Um, slightly off-topic, but wouldn't funlink() be somewhat disastrous in
No more than unlink(), provided that the link count was only one;
alternately the pathname could be cached in the kernel. ;-)
> That would require a file-
> system cleaner process or a routine that knew instantly how to match inode
> numbers to pathnames
Why "instantly"? funlink() could block until it found the directory
entry and confirmed that the link count was still one. :-)
> You will note that there is no converse
> routine, since while name -> ino-dev is unique for each ino-dev, the
> reverse is untrue -- consider /foo/bar/.. and /foo, for example...").
Yes, that's strictly true, but your example is slightly wrong. :-)
Greg A. Woods
+1 416 218-0098; <firstname.lastname@example.org>; <email@example.com>
Planix, Inc. <firstname.lastname@example.org>; VE3TCP; Secrets of the Weird <email@example.com>