From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 2 15:40:35 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 B54E016A41F for ; Sun, 2 Oct 2005 15:40:35 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5245943D45 for ; Sun, 2 Oct 2005 15:40:35 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: by xproxy.gmail.com with SMTP id t6so137075wxc for ; Sun, 02 Oct 2005 08:40:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=MbNgPeMc52q8kBD9RNrHx+4UNhfnjj1nIl0rhM0PXhHuUNDMYnn89EmTVqHfx/Nlr113dshPBrpkip420KOheJVDmC0z8/hXoX9wzydMSYrFxCF54AffkC03gnCT4XjBcgrU3U/ZxELO2at3Gb7gOicqEyVTkmVzq8b3vPh3oAQ= Received: by 10.70.39.14 with SMTP id m14mr1385980wxm; Sun, 02 Oct 2005 08:40:34 -0700 (PDT) Received: by 10.70.10.5 with HTTP; Sun, 2 Oct 2005 08:40:34 -0700 (PDT) Message-ID: <70e8236f0510020840s41fb5a93o20209f64409fd426@mail.gmail.com> Date: Sun, 2 Oct 2005 16:40:34 +0100 From: Joao Barros To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Importing bio aka RAID Management Framework from OpenBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joao Barros List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2005 15:40:35 -0000 Hi all, I proposed to import bio aka RAID Management Framework from OpenBSD. I have studied how bio is implemented in OpenBSD and here is a quick resume of the 3 components that make bio: - bio - ioctl tunnel pseudo-device /dev/bio.c biovar.h The bio driver provides userland applications ioctl access to devices otherwise not found as /dev nodes. The /dev/bio device node operates = by delegating ioctl(2) calls to a requested device driver. Only drivers which have registered with the bio device can be accessed via this int= er- face. - ciss, amr - supported device drivers - bioctl - RAID management interface RAID device drivers which support management functionality can register their services with the bio(4) driver. bioctl then can be used to mai= n- tain RAID volumes. After analysing the structure of /src my initial idea was: new /src/sys/contrib/dev/bio/bio.c biovar.h new /src/sys/modules/bio/makefile new /src/contrib/bio/bioctl.c edit amr and ciss to register themselves on bio 1st: are these the correct places to be putting this files? 2nd: the drivers need to register to bio, this one being a kernel module. If bio is not compiled in that can represent a problem. Ideas? References: Theo De Raadt initial presentation of bio: http://marc.theaimsgroup.com/?l=3Dopenbsd-misc&m=3D112630095818062 bio manpage: http://www.openbsd.org/cgi-bin/man.cgi?query=3Dbio&sektion=3D4= &arch=3Di386&apropos=3D0&manpath=3DOpenBSD+Current bioctl manpage: http://www.openbsd.org/cgi-bin/man.cgi?query=3Dbioctl&sektion=3D8&arch=3Di3= 86&apropos=3D0&manpath=3DOpenBSD+Current -- Joao Barros