Date: Sun, 18 Jan 2009 21:52:02 +0000 (UTC) From: Ulf Lilleengen <lulf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r187412 - in stable/7/sys: . contrib/pf dev/cxgb geom/vinum Message-ID: <200901182152.n0ILq2B8088298@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lulf Date: Sun Jan 18 21:52:01 2009 New Revision: 187412 URL: http://svn.freebsd.org/changeset/base/187412 Log: MFC r186517: - Fix an issue with access permissions to underlying disks used by a gvinum plex. If the plex is a raid5 plex, and is being written to, parity data might have to be read from the underlying disks, requiring them to be opened for reading as well as writing. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/geom/vinum/geom_vinum_plex.c Modified: stable/7/sys/geom/vinum/geom_vinum_plex.c ============================================================================== --- stable/7/sys/geom/vinum/geom_vinum_plex.c Sun Jan 18 21:40:15 2009 (r187411) +++ stable/7/sys/geom/vinum/geom_vinum_plex.c Sun Jan 18 21:52:01 2009 (r187412) @@ -667,11 +667,21 @@ gv_plex_normal_request(struct gv_plex *p 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")); + + 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901182152.n0ILq2B8088298>