From owner-cvs-src@FreeBSD.ORG Thu Nov 10 14:55:07 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 848A316A420; Thu, 10 Nov 2005 14:55:07 +0000 (GMT) (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 1E73943D68; Thu, 10 Nov 2005 14:55:00 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jAAEsxj5031859; Thu, 10 Nov 2005 07:54:59 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43735F4C.7070307@samsco.org> Date: Thu, 10 Nov 2005 07:55:08 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Poul-Henning Kamp References: <5761.1131632514@critter.freebsd.dk> In-Reply-To: <5761.1131632514@critter.freebsd.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: Doug White , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Doug White , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_subr.c src/sys/fs/devfs devfs_vnops.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2005 14:55:07 -0000 Poul-Henning Kamp wrote: > In message <437351BB.6000103@samsco.org>, Scott Long writes: > > >>Putting the cookie into the dirent means either changing the size of the >>dirent struct and breaking the userland ABI (almost as bad as changing >>the size of stat, but not quite), or making a 'kdirent' struct and then >>manually shifting and copying it to a dirent struct. > > > Not really that bad. > > My idea was to make a > struct kdirent { > struct dirent foo; > cookie stuff bar; > } > > Filesystems would call vfs_read_dirent() with a struct kdirent and > depending on the userland/kernel flag in the uio vfs_read_dirent() > would copy either the entire kdirent or only the userspace dirent. > > > >>What I really think this is is a ploy by PHK to get someone motivated to >>fix it for him ;-) > > > I'm generally in favour of people doing work so I don't have to but > in this particular case that was not the motivation :-) > > (At least you can't prove anything!) > > Poul-Henning > I still don't see how this is supposed to work. VOP_READDIR() doesn't return the dirent array to the caller, it's directly copied to the user buffer. Scott