Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2008 07:49:16 -0500
From:      "Michael Jung" <mikej@paymentallianceintl.com>
To:        "Ulf Lilleengen" <ulf.lilleengen@gmail.com>, "John-Mark Gurney" <jmg@funkthat.com>
Cc:        freebsd-geom@freebsd.org
Subject:   RE: Encrypting raid5 volume with geli
Message-ID:  <ADC733B130BF1D4A82795B6B3A2654E277739C@exchange.paymentallianceintl.com>
In-Reply-To: <20081214215913.GA3723@nobby>

next in thread | previous in thread | raw e-mail | index | archive | help
<Snip>
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ADC733B130BF1D4A82795B6B3A2654E277739C>