From owner-freebsd-geom@FreeBSD.ORG Wed Dec 17 12:49:28 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A5F71065672 for ; Wed, 17 Dec 2008 12:49:28 +0000 (UTC) (envelope-from mikej@paymentallianceintl.com) Received: from mx2.confluenttech.com (mx2.confluentasp.com [216.26.153.14]) by mx1.freebsd.org (Postfix) with ESMTP id 31F9C8FC2D for ; Wed, 17 Dec 2008 12:49:27 +0000 (UTC) (envelope-from mikej@paymentallianceintl.com) Received: from calvin.pai.local (calvin.pai.local [10.0.6.33]) by mx2.confluenttech.com (8.14.1/8.13.8) with ESMTP id mBHCnMWx048159; Wed, 17 Dec 2008 07:49:22 -0500 (EST) (envelope-from mikej@paymentallianceintl.com) Authentication-Results: mx2.confluenttech.com from=mikej@paymentallianceintl.com; sender-id=neutral; spf=neutral X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: Wed, 17 Dec 2008 07:49:16 -0500 Message-ID: In-Reply-To: <20081214215913.GA3723@nobby> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Encrypting raid5 volume with geli Thread-Index: AcleP7hsw02LYDdUT6+h37sWQNCdMQCBfvuw From: "Michael Jung" To: "Ulf Lilleengen" , "John-Mark Gurney" Importance: normal Priority: normal Cc: freebsd-geom@freebsd.org Subject: RE: Encrypting raid5 volume with geli X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2008 12:49:28 -0000 Yes, I agree. Michael, could you try the attached patch? It should fix the issue within gvinum itself. The previous change will have to be reverted too. -- Ulf Lilleengen The patch fails - FreeBSD 7.1-PRERELEASE #0: Sat Dec 13 15:09:38 EST 200 root@charon) /usr/src/sys/geom/vinum# patch geom_vinum_plex.c /tmp/gvinum_raid5_accessfix.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: geom_vinum_plex.c |=================================================================== |--- geom_vinum_plex.c (revision 186095) |+++ geom_vinum_plex.c (working copy) -------------------------- Patching file geom_vinum_plex.c using Plan A... Hunk #1 failed at 663. 1 out of 1 hunks failed--saving rejects to geom_vinum_plex.c.rej Done ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ (root@charon) /usr/src/sys/geom/vinum# more geom_vinum_plex.c.rej *************** *** 663,674 **** static int gv_plex_access(struct g_provider *pp, int dr, int dw, int de) { struct g_geom *gp; struct g_consumer *cp, *cp2; int error; gp = pp->geom; LIST_FOREACH(cp, &gp->consumer, consumer) { error = g_access(cp, dr, dw, de); if (error) { --- 663,685 ---- static int gv_plex_access(struct g_provider *pp, int dr, int dw, int de) { + struct gv_plex *p; struct g_geom *gp; struct g_consumer *cp, *cp2; int error; gp = pp->geom; + p = gp->softc; + KASSERT(p != NULL, ("NULL p")); + /* For raid5 plexes, the providers must be read for parity check. */ + if (p->org == GV_PLEX_RAID5) { + if (dw > 0 && dr == 0) + dr = 1; + else if (dw < 0 && dr == 0) + dr = -1; + } + LIST_FOREACH(cp, &gp->consumer, consumer) { error = g_access(cp, dr, dw, de); if (error) { (root@charon) /usr/src/sys/geom/vinum# --mikej CONFIDENTIALITY NOTE: This message is intended only for the use of the individual or entity to whom it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, please notify us by telephone at (502) 212-4001 or notify us at PAI , Dept. 99, 11857 Commonwealth Drive, Louisville, KY 40299. Thank you.