From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 13 20:02:09 2005 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 CCA8916A41C; Mon, 13 Jun 2005 20:02:09 +0000 (GMT) (envelope-from SRS0+0b851353296582aa3a45+659+infradead.org+hch@pentafluge.srs.infradead.org) Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 738C843D49; Mon, 13 Jun 2005 20:02:09 +0000 (GMT) (envelope-from SRS0+0b851353296582aa3a45+659+infradead.org+hch@pentafluge.srs.infradead.org) Received: from hch by pentafluge.infradead.org with local (Exim 4.43 #1 (Red Hat Linux)) id 1Dhv8J-0001XF-EJ; Mon, 13 Jun 2005 21:02:07 +0100 Date: Mon, 13 Jun 2005 21:02:07 +0100 From: Christoph Hellwig To: Julian Elischer Message-ID: <20050613200207.GA5823@infradead.org> References: <42ADC762.6010801@elischer.org> <20050613181435.GA3096@infradead.org> <42ADD253.4020606@samsco.org> <20050613184551.GA3853@infradead.org> <42ADD6AC.3060505@samsco.org> <20050613190224.GA4308@infradead.org> <42ADE480.9040908@elischer.org> <20050613195917.GA5710@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050613195917.GA5710@infradead.org> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Cc: Daniel Eischen , freebsd-hackers@freebsd.org, Scott Long , Apache Xie Subject: Re: contigmalloc() and mmap() 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: Mon, 13 Jun 2005 20:02:09 -0000 On Mon, Jun 13, 2005 at 08:59:17PM +0100, Christoph Hellwig wrote: > disk drivers use a completely different set of entry points in Linux, > and don't have access to per-fd data even in the case they're opened > from userland. Character drivers to which this applies OTOH always > get a valid struct file, it's guranteed as part of the driver API. That beeing said I'd suggest to not pass down the whole file struct if you want to add this feature for freebsd but just some well-defined API to store data in them. Giving driver writers less rope to shoot themselves improves averange driver quality significantly. We'll probably move towards such an API in Linux aswell one day, but it's a lot of work once drivers have started to do all kinds of nasty things.