From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 13 19:59:27 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 927FA16A41C; Mon, 13 Jun 2005 19:59:27 +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 3890E43D48; Mon, 13 Jun 2005 19:59:24 +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 1Dhv5Z-0001VI-NV; Mon, 13 Jun 2005 20:59:17 +0100 Date: Mon, 13 Jun 2005 20:59:17 +0100 From: Christoph Hellwig To: Julian Elischer Message-ID: <20050613195917.GA5710@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42ADE480.9040908@elischer.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 , Scott Long , Apache Xie , freebsd-hackers@freebsd.org 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 19:59:27 -0000 On Mon, Jun 13, 2005 at 12:54:40PM -0700, Julian Elischer wrote: > though, some people use it for that purpose (e.g. in the original posting). driver writers do all kinds of odd things ;-) > it might not be such a bad idea.. > I don't see why the device entrypoints shouldn't have that argument > available.. (file descriptor by which we are getting here) > As long as it can take account of the fact that not all accesses come > via an FD > (e.g mounted disks). 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.