From owner-freebsd-arch Mon Apr 10 11:57:27 2000 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id E555A37BCAC for ; Mon, 10 Apr 2000 11:57:20 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id UAA02390 for ; Mon, 10 Apr 2000 20:57:21 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id UAA05632 for freebsd-arch@freebsd.org; Mon, 10 Apr 2000 20:57:19 +0200 (CEST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 6AA3837B896 for ; Mon, 10 Apr 2000 11:57:09 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id UAA25107; Mon, 10 Apr 2000 20:56:50 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Julian Elischer Cc: arch@freebsd.org Subject: Re: BUF/BIO roadmap. In-reply-to: Your message of "Mon, 10 Apr 2000 08:24:53 PDT." <38F1F245.2781E494@elischer.org> Date: Mon, 10 Apr 2000 20:56:50 +0200 Message-ID: <25105.955393010@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <38F1F245.2781E494@elischer.org>, Julian Elischer writes: >>From memory, I managed to do this without having a pbklno and a >lblkno.(I noticed that you still have both in the document) in the >bio struct (my ioreq) so I wonder whether it is really needed. >(I may have got the names wrong as the document is not in front of me) With the stackable BIO pblkno either go away or get modified to be more general. Performance-wise pblkno *in some form* makes sense, there is no point in allocating a new struct bio for the basic slicer like MBR or BSD since only the offset is changed. One way to do this is to have a separate field in buf/bio and copy it in DEV_STRATEGY. This would make the bio_ field owned by the BIO subsystem and as such modifiable. iodone_chain goes away and bio_done becomes nestable. >You make no mention as to how one maps >an arbitrarily stacked set of partitions into minor numbers. >(i.e. what is the minor number of a partition called da2s1de Arbitrarily stacked nodes may require either a DEVFS or a devd (or geomd ?) to handle that issue. Backwards compatible stacking (ie: MBR then BSD) will use legacy minors to perserve POLA. >Unless we get BSDI style interrupt threads, the idea of propogating >up 'probe' operations cannot be done safely It sure can, but you need a kernel or user process to do the grunt work. A user process may be desirable for other reasons. >The Other problem I faced was the possibility that >when a low level device was open, the user might re-write the >structures that defined some upper layer devices. My solution for >that was that on the close() of the lower level device, all >the upper level devices were asked to verify that they were >still valid. It is certainly a sticky issue no matter how you tackle it, and I am more than a little bit tempted to apply root-inteligence rather than code complexity to this problem. A re-probe on close is probably the only sane, simplest and most POLA preserving action available. >In the downward propogation of open() and close() calls, we need to >propogate independently open-for-read() and open-for-read+write() >If one partition is already open for read and the another is openned >for read/write, then the 'downstream' device needs to be upgraded for >read/write. Obviously. >Justin Gibbs suggested that this call should also allow the driver >to know WHO is making hte call, Yeah, but unfortunately we loose that information long before we get to that point, from memory I belive it was VOP_OPEN which discards all but the credentials. The dup(2) problem in other words. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message