Skip providers with not defined sector size.

Reported by:	kuriyama
This commit is contained in:
Pawel Jakub Dawidek 2004-08-26 12:42:47 +00:00
parent db68d2a6b7
commit 29c78ab315
5 changed files with 15 additions and 0 deletions

View File

@ -545,6 +545,9 @@ g_concat_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_assert();
G_CONCAT_DEBUG(3, "Tasting %s.", pp->name);
/* Skip providers with 0 sectorsize. */
if (pp->sectorsize == 0)
return (NULL);
gp = g_new_geomf(mp, "concat:taste");
gp->start = g_concat_start;

View File

@ -201,6 +201,9 @@ g_label_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
G_LABEL_DEBUG(2, "Tasting %s.", pp->name);
/* Skip providers with 0 sectorsize. */
if (pp->sectorsize == 0)
return (NULL);
if (strcmp(pp->geom->class->name, mp->name) == 0)
return (NULL);

View File

@ -2490,6 +2490,9 @@ g_mirror_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_assert();
g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, pp->name);
G_MIRROR_DEBUG(2, "Tasting %s.", pp->name);
/* Skip providers with 0 sectorsize. */
if (pp->sectorsize == 0)
return (NULL);
gp = g_new_geomf(mp, "mirror:taste");
/*

View File

@ -2703,6 +2703,9 @@ g_raid3_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_assert();
g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, pp->name);
G_RAID3_DEBUG(2, "Tasting %s.", pp->name);
/* Skip providers with 0 sectorsize. */
if (pp->sectorsize == 0)
return (NULL);
gp = g_new_geomf(mp, "raid3:taste");
/* This orphan function should be never called. */

View File

@ -876,6 +876,9 @@ g_stripe_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_assert();
G_STRIPE_DEBUG(3, "Tasting %s.", pp->name);
/* Skip providers with 0 sectorsize. */
if (pp->sectorsize == 0)
return (NULL);
gp = g_new_geomf(mp, "stripe:taste");
gp->start = g_stripe_start;