svn commit: r190136 - projects/gvinum/sys/geom/vinum

Ulf Lilleengen lulf at FreeBSD.org
Fri Mar 20 02:01:35 PDT 2009


Author: lulf
Date: Fri Mar 20 09:01:34 2009
New Revision: 190136
URL: http://svn.freebsd.org/changeset/base/190136

Log:
  - Fix a bug where gvinum would assume that a plex had subdisks during size
    calculation.

Modified:
  projects/gvinum/sys/geom/vinum/geom_vinum_subr.c

Modified: projects/gvinum/sys/geom/vinum/geom_vinum_subr.c
==============================================================================
--- projects/gvinum/sys/geom/vinum/geom_vinum_subr.c	Fri Mar 20 05:51:54 2009	(r190135)
+++ projects/gvinum/sys/geom/vinum/geom_vinum_subr.c	Fri Mar 20 09:01:34 2009	(r190136)
@@ -441,11 +441,11 @@ gv_plex_size(struct gv_plex *p)
 		break;
 	case GV_PLEX_STRIPED:
 		s = LIST_FIRST(&p->subdisks);
-		size = sdcount * s->size;
+		size = ((s != NULL) ? (sdcount * s->size) : 0);
 		break;
 	case GV_PLEX_RAID5:
 		s = LIST_FIRST(&p->subdisks);
-		size = (sdcount - 1) * s->size;
+		size = ((s != NULL) ? ((sdcount - 1) * s->size) : 0);
 		break;
 	}
 


More information about the svn-src-projects mailing list