From owner-cvs-all@FreeBSD.ORG Sat Mar 3 05:15:12 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E54516A401; Sat, 3 Mar 2007 05:15:12 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 25CF113C47E; Sat, 3 Mar 2007 05:15:11 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l235F5bq002137; Fri, 2 Mar 2007 22:15:10 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <45E9044A.3090300@samsco.org> Date: Fri, 02 Mar 2007 22:14:50 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: John Baldwin References: <200702191056.l1JAuASc059200@repoman.freebsd.org> <200702201122.00390.jhb@freebsd.org> <20070222171720.GI39168@deviant.kiev.zoral.com.ua> <200702221238.11641.jhb@freebsd.org> In-Reply-To: <200702221238.11641.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Fri, 02 Mar 2007 22:15:10 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: Kostik Belousov , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_syscalls.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2007 05:15:12 -0000 John Baldwin wrote: > On Thursday 22 February 2007 12:17, Kostik Belousov wrote: >> On Tue, Feb 20, 2007 at 11:21:59AM -0500, John Baldwin wrote: >>> On Tuesday 20 February 2007 09:49, Kostik Belousov wrote: >>>> On Mon, Feb 19, 2007 at 06:39:58PM -0500, John Baldwin wrote: >>>>> On Monday 19 February 2007 05:56, Konstantin Belousov wrote: >>>>>> kib 2007-02-19 10:56:10 UTC >>>>>> >>>>>> FreeBSD src repository >>>>>> >>>>>> Modified files: >>>>>> sys/kern vfs_syscalls.c >>>>>> Log: >>>>>> Remove union_dircheckp hook, it is not needed by new unionfs code anymore. >>>>>> As consequence, getdirentries() no longer needs to drop/reacquire >>>>>> directory vnode lock, that would allow it to be reclaimed in between. >>>>> I think there is at least one more copy of getdirentries() under sys/compat, >>>>> possibly multiple. Are you going to fix this in all of them? >>>> Could you, please, point out where is it ? My grep told me that I removed >>>> all references to the union_dircheckp, and I think that getdirentries() code >>>> had to have references to it. My change modified two syscalls: getdirentries() >>>> and ogetdirentries(). >>> Well, I did find at least 3 ABIs (Linux, svr4, and ibcs2) that do their own >>> wrapper around VOP_READDIR(), but none of them had the union check in them. >> As result, "mount -o union" does not work for compat binaries. >> >>> Do you know why the ABIs use cookies for VOP_READDIR() but getdirentries() >>> doesn't? >> No, and it seems that cookies, as well as vfs_syscalls.c avoidance of cookies >> (together with union_dircheckp) go back to at least 1994/1997 years, and >> Lite-2 import (see commit logs for rev. 1.9 and 1.54 of vfs_syscalls.c). > > What would be nice would be to have a kern_getdirentries() that took a > function pointer that took a directory record and did the actual > conversion + UIO so we could cut down on the duplicated code. > Actually, Linux does this, and it's a mess IMHO. The cure is much worse than the disease. Scott