From owner-freebsd-arch@FreeBSD.ORG Thu Mar 19 11:17:07 2009 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE42A106566B; Thu, 19 Mar 2009 11:17:07 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 7A85F8FC0A; Thu, 19 Mar 2009 11:17:07 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A686973098; Thu, 19 Mar 2009 12:21:52 +0100 (CET) Date: Thu, 19 Mar 2009 12:21:52 +0100 From: Luigi Rizzo To: Pawel Jakub Dawidek Message-ID: <20090319112152.GB38075@onelab2.iet.unipi.it> References: <20090319081936.GA32750@onelab2.iet.unipi.it> <20090319094505.GA1539@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090319094505.GA1539@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i Cc: fabio@gandalf.sssup.it, geom@FreeBSD.org, phk@FreeBSD.org, arch@FreeBSD.org, ivan@FreeBSD.org Subject: Re: RFC: adding 'proxy' nodes to provider ports (with patch) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2009 11:17:08 -0000 On Thu, Mar 19, 2009 at 10:45:05AM +0100, Pawel Jakub Dawidek wrote: > On Thu, Mar 19, 2009 at 09:19:36AM +0100, Luigi Rizzo wrote: ... > The one advantage I see for this over using regular GEOM rules is that > new consumers go through proxy automatically. When I was working on > similar functionality I more wanted to do something like this: > > consumer1 consumer2 > \ / > \ / > provider > > Insert the proxy in the middle of any provider-consumer pair: > > consumer1 consumer2 > | | > proxy_provider | > | / > proxy_consumer / > \ / > provider ok this is slightly different from what we have implemented, as we hook into the provider whereas you hook into the consumer. In our case we really need the hook to be in the provider so it intercepts accesses from all consumers, e.g. from /dev/ad0 and from the filesystems mounted on top of it. Given that the geom_disk node does not have a consumer on the bottom, we cannot do it differently. I can imagine that one might want to attach a proxy to a consumer port, but I cannot make a specific case where this would be needed. Also, I wonder how do i name a consumer port in the geom model ?? cheers luigi