From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 4 22:26:04 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B27516A58E; Sat, 4 Nov 2006 22:26:04 +0000 (UTC) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id A51C543D46; Sat, 4 Nov 2006 22:26:03 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from [192.168.1.102] (c-71-231-138-78.hsd1.or.comcast.net [71.231.138.78]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.1/8.13.1) with ESMTP id kA4MPocD085973; Sat, 4 Nov 2006 17:25:53 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Sat, 4 Nov 2006 14:24:30 -0800 (PST) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Kostik Belousov In-Reply-To: <20061104134448.GM12108@deviant.kiev.zoral.com.ua> Message-ID: <20061104124649.M622@10.0.0.1> References: <454C55BD.000003.22283@webmail11.yandex.ru> <20061104090204.GA38945@stud.fit.vutbr.cz> <454C75B9.000002.09555@mfront8.yandex.ru> <20061104134448.GM12108@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.52 on 216.240.101.25 X-Mailman-Approved-At: Mon, 06 Nov 2006 20:08:34 +0000 Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, "Andrey V. Elsukov" , joel@freebsd.org Subject: Re: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2006 22:26:04 -0000 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