Encrypting raid5 volume with geli

Michael Jung mikej at paymentallianceintl.com
Wed Dec 17 04:49:28 PST 2008


<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 at 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 at 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 at 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.


More information about the freebsd-geom mailing list