From owner-freebsd-geom@FreeBSD.ORG Fri Feb 20 12:51:48 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB7FA16A4CE; Fri, 20 Feb 2004 12:51:48 -0800 (PST) Received: from mailbox.univie.ac.at (mailbox.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2334643D1F; Fri, 20 Feb 2004 12:51:48 -0800 (PST) (envelope-from le@FreeBSD.org) Received: from leelou (adslle.cc.univie.ac.at [131.130.102.11]) i1KKpgsb1303592; Fri, 20 Feb 2004 21:51:44 +0100 Date: Fri, 20 Feb 2004 21:51:37 +0100 (CET) From: Lukas Ertl To: current@FreeBSD.org, geom@FreeBSD.org Message-ID: <20040220214613.K15048@leelou.in.tern> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: imap 4243; Body=0 Fuz1=0 Fuz2=0 Subject: geom_vinum + RAID5 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2004 20:51:48 -0000 Hi, I've uploaded a new snapshot of geom_vinum, you can find it at . It now has rudimentary RAID5 support, which means it can read and write RAID5 plexes as long as all subdisks are up (no error handling). If anyone wants to help out with that, just raise your hands. There's still a lot to do if we want this to come out before 5.3. regards, le -- Lukas Ertl http://mailbox.univie.ac.at/~le/ le@FreeBSD.org http://people.freebsd.org/~le/ From owner-freebsd-geom@FreeBSD.ORG Sat Feb 21 07:41:10 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 242E616A4CE for ; Sat, 21 Feb 2004 07:41:10 -0800 (PST) Received: from mailbox.univie.ac.at (mail.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 795D743D2D for ; Sat, 21 Feb 2004 07:41:09 -0800 (PST) (envelope-from le@FreeBSD.org) Received: from leelou (adslle.cc.univie.ac.at [131.130.102.11]) i1LFf1QG1258128 for ; Sat, 21 Feb 2004 16:41:05 +0100 Date: Sat, 21 Feb 2004 16:40:56 +0100 (CET) From: Lukas Ertl To: geom@FreeBSD.org Message-ID: <20040221162942.P19540@leelou.in.tern> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: mailbox 4246; Body=0 Fuz1=0 Fuz2=0 Subject: GEOM + RAID5 help X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2004 15:41:10 -0000 Hi, I'm currently implementing the RAID5 bit of geom_vinum, and I could use a little help. One problem I'm faced is that if the subdisk where the original request should go to is down, I need to read all the other stripes, recalculate the parity with the original data, and then write the parity stripe (in the BIO_WRITE case), or read all other stripes plus the parity to recalculate the desired data (in the BIO_READ case). If I'm not mistaken then I'm not allowed to use g_read_data in the IO path, so how can I correctly get at the data of the other stripes? Should I create my own bio (how?) with the appropriate bio_cmd and send it down the path using g_io_request (where should I issue it? In my bio_done routine?)? Thanks for all pointers and suggestions. -- Lukas Ertl http://mailbox.univie.ac.at/~le/ le@FreeBSD.org http://people.freebsd.org/~le/ From owner-freebsd-geom@FreeBSD.ORG Sat Feb 21 07:45:43 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 777A916A4CE; Sat, 21 Feb 2004 07:45:43 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id E051443D1D; Sat, 21 Feb 2004 07:45:42 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id i1LFjcbq062346; Sat, 21 Feb 2004 16:45:38 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: Lukas Ertl From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 21 Feb 2004 16:40:56 +0100." <20040221162942.P19540@leelou.in.tern> Date: Sat, 21 Feb 2004 16:45:38 +0100 Message-ID: <62345.1077378338@critter.freebsd.dk> cc: geom@freebsd.org Subject: Re: GEOM + RAID5 help X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2004 15:45:43 -0000 In message <20040221162942.P19540@leelou.in.tern>, Lukas Ertl writes: >Hi, > >I'm currently implementing the RAID5 bit of geom_vinum, and I could use a >little help. One problem I'm faced is that if the subdisk where the >original request should go to is down, I need to read all the other >stripes, recalculate the parity with the original data, and then write the >parity stripe (in the BIO_WRITE case), or read all other stripes plus the >parity to recalculate the desired data (in the BIO_READ case). > >If I'm not mistaken then I'm not allowed to use g_read_data in the IO >path, so how can I correctly get at the data of the other stripes? Should >I create my own bio (how?) with the appropriate bio_cmd and send it down >the path using g_io_request (where should I issue it? In my bio_done >routine?)? Go look at sys/geom/bde/g_bde_work.c, it does something very similar. Basically, you need to implement a state engine. You do not need to have a thread for it like GBDE, because the XOR is a lot cheaper than a full crypto. So what you do is you allocate the necessary number of bio structures fill them in and ship them down. The biodone routine you specify should then update status, and when all bits have arrived, do the XOR and complete the operation. Read the bit in sys/geom/notes about locking of bio_children carefully as it will save you a lot of locking worries. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Sat Feb 21 18:46:26 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A9E716A4CE; Sat, 21 Feb 2004 18:46:26 -0800 (PST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0ECB43D1D; Sat, 21 Feb 2004 18:46:25 -0800 (PST) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 35C492BD4A; Sun, 22 Feb 2004 13:46:24 +1100 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 3594351211; Sun, 22 Feb 2004 13:16:22 +1030 (CST) Date: Sun, 22 Feb 2004 13:16:22 +1030 From: Greg 'groggy' Lehey To: Lukas Ertl Message-ID: <20040222024622.GM55671@wantadilla.lemis.com> References: <20040221162942.P19540@leelou.in.tern> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9v2bTOXBzuB5Piju" Content-Disposition: inline In-Reply-To: <20040221162942.P19540@leelou.in.tern> User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: geom@FreeBSD.org Subject: Re: GEOM + RAID5 help X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 02:46:26 -0000 --9v2bTOXBzuB5Piju Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Saturday, 21 February 2004 at 16:40:56 +0100, Lukas Ertl wrote: > Hi, > > I'm currently implementing the RAID5 bit of geom_vinum, and I could use a > little help. One problem I'm faced is that if the subdisk where the > original request should go to is down, I need to read all the other > stripes, recalculate the parity with the original data, and then write the > parity stripe (in the BIO_WRITE case), or read all other stripes plus the > parity to recalculate the desired data (in the BIO_READ case). You don't need to have a disk down to have this issue. When writing a RAID-5 block, you almost always need to do something similar. Look at complete_raid5_write() in vinuminterrupt.c for how it's done now. Greg -- Note: I discard all HTML mail unseen. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --9v2bTOXBzuB5Piju Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFAOBf+IubykFB6QiMRAkSrAJ4sq0sJBFHCR6ASbNicqvGu0uj/0gCfUjxT 7hrOWe/6J4BnCXNSGgbPqZY= =eumt -----END PGP SIGNATURE----- --9v2bTOXBzuB5Piju--