Yet another magic symlinks implementation
Jeff Roberson
jroberson at chesapeake.net
Sat Nov 4 22:26:04 UTC 2006
On Sat, 4 Nov 2006, Kostik Belousov wrote:
> On Sat, Nov 04, 2006 at 02:12:57PM +0300, Andrey V. Elsukov wrote:
>>> On Sat, Nov 04, 2006 at 11:56:29AM +0300, Andrey V. Elsukov wrote:
>>>> I've ported NetBSD magic symlinks implementation to FreeBSD.
>>>> The description of magiclinks can been found here:
>>>> http://www.daemon-systems.org/man/symlink.7.html
>>>>
>>>> Patch here:
>>>> http://butcher.heavennet.ru/patches/kernel/magiclinks/
>>>
>>> thnx for porting this, have you checked locking? netbsd
>>> kernel is still under one giant lock so locking might
>>> differ.
>>
>> Sorry, i'm not locking guru.. Code seems simple..
>> Mybe somebody from committers can see into code?
>> Konstantin, Jeff, whath you think?
>
> I don't think that any additional locking is required there.
>
No additional locking is required.
This code really needs some work though. First of all, macros should
never operate on variables not passed in as arguments. The SUBSTITUTE
macro should be a function. The matching algorithm is not very efficient
either.
Jeff
More information about the freebsd-hackers
mailing list