FreeBSD/sys/geom/vinum/geom_vinum_subr.c
/* Returns the size of a volume. */
Returns the size of a volume.
Returns the size of a volume .
off_t
gv_vol_size(struct gv_volume *v)
{
	struct gv_plex *p;
	off_t minplexsize;
	KASSERT(v != NULL, ("gv_vol_size: NULL v"));
	p = LIST_FIRST(&v->plexes);
	if (p == NULL)
		return (0);
	minplexsize = p->size;
	LIST_FOREACH(p, &v->plexes, in_volume) {
		if (p->size < minplexsize) {
			minplexsize = p->size;
		}
	}
	return (minplexsize);
}
off_t gv_vol_size ( struct gv_volume * v ) { struct gv_plex * p ; off_t minplexsize ; KASSERT ( v != NULL , ( " " ) ) ; p = LIST_FIRST ( & v -> plexes ) ; if ( p == NULL ) return ( 0 ) ; minplexsize = p -> size ; LIST_FOREACH ( p , & v -> plexes , in_volume ) { if ( p -> size < minplexsize ) { minplexsize = p -> size ; } } return ( minplexsize ) ; }
Returns the size of a volume.
Returns the size of a volume .