aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>2006-09-09 21:45:37 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>2006-09-09 21:45:37 +0000
commit0cca572e645bd9a6e397bf4a6e02c5b187f2076f (patch)
tree84526cadb4bbd2f0c29c540a72b7f9f31d1a7b6c /sys/geom
parentd1215a3738bee7987ecb304dd17182264c1528bc (diff)
downloadsrc-0cca572e645bd9a6e397bf4a6e02c5b187f2076f.tar.gz
src-0cca572e645bd9a6e397bf4a6e02c5b187f2076f.zip
move created/detected/activated under debug level 1 to quiet the common case..
add count of active and total components to the launched line so you can see at a glance if your mirror/raid3 is complete... now: GEOM_MIRROR: Device mirror/sam launched (2/2). Reviewed by: pjd
Notes
Notes: svn path=/head/; revision=162188
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/mirror/g_mirror.c11
-rw-r--r--sys/geom/raid3/g_raid3.c12
2 files changed, 13 insertions, 10 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 56e52bb94d7f..1d8e6af2f5ed 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -1988,8 +1988,8 @@ g_mirror_launch_provider(struct g_mirror_softc *sc)
sc->sc_provider = pp;
g_error_provider(pp, 0);
g_topology_unlock();
- G_MIRROR_DEBUG(0, "Device %s: provider %s launched.", sc->sc_name,
- pp->name);
+ G_MIRROR_DEBUG(0, "Device %s launched (%u/%u).", pp->name,
+ g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE), sc->sc_ndisks);
LIST_FOREACH(disk, &sc->sc_disks, d_next) {
if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING)
g_mirror_sync_start(disk);
@@ -2391,7 +2391,7 @@ again:
if (dp != NULL)
LIST_INSERT_AFTER(dp, disk, d_next);
}
- G_MIRROR_DEBUG(0, "Device %s: provider %s detected.",
+ G_MIRROR_DEBUG(1, "Device %s: provider %s detected.",
sc->sc_name, g_mirror_get_diskname(disk));
if (sc->sc_state == G_MIRROR_DEVICE_STATE_STARTING)
break;
@@ -2432,7 +2432,7 @@ again:
disk->d_sync.ds_offset_done = 0;
g_mirror_update_idle(sc, disk);
g_mirror_update_metadata(disk);
- G_MIRROR_DEBUG(0, "Device %s: provider %s activated.",
+ G_MIRROR_DEBUG(1, "Device %s: provider %s activated.",
sc->sc_name, g_mirror_get_diskname(disk));
break;
case G_MIRROR_DISK_STATE_STALE:
@@ -2849,7 +2849,8 @@ g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md)
return (NULL);
}
- G_MIRROR_DEBUG(0, "Device %s created (id=%u).", sc->sc_name, sc->sc_id);
+ G_MIRROR_DEBUG(1, "Device %s created (%u components, id=%u).",
+ sc->sc_name, sc->sc_ndisks, sc->sc_id);
sc->sc_rootmount = root_mount_hold("GMIRROR");
G_MIRROR_DEBUG(1, "root_mount_hold %p", sc->sc_rootmount);
diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c
index 177148bde75d..23e2f1b2d3f8 100644
--- a/sys/geom/raid3/g_raid3.c
+++ b/sys/geom/raid3/g_raid3.c
@@ -2266,8 +2266,9 @@ g_raid3_launch_provider(struct g_raid3_softc *sc)
sc->sc_provider = pp;
g_error_provider(pp, 0);
g_topology_unlock();
- G_RAID3_DEBUG(0, "Device %s: provider %s launched.", sc->sc_name,
- pp->name);
+ G_RAID3_DEBUG(0, "Device %s launched (%u/%u).", pp->name,
+ g_raid3_ndisks(sc, G_RAID3_DISK_STATE_ACTIVE), sc->sc_ndisks);
+
if (sc->sc_state == G_RAID3_DEVICE_STATE_DEGRADED)
g_raid3_sync_start(sc);
}
@@ -2632,7 +2633,7 @@ again:
DISK_STATE_CHANGED();
disk->d_state = state;
- G_RAID3_DEBUG(0, "Device %s: provider %s detected.",
+ G_RAID3_DEBUG(1, "Device %s: provider %s detected.",
sc->sc_name, g_raid3_get_diskname(disk));
if (sc->sc_state == G_RAID3_DEVICE_STATE_STARTING)
break;
@@ -2675,7 +2676,7 @@ again:
disk->d_sync.ds_offset_done = 0;
g_raid3_update_idle(sc, disk);
g_raid3_update_metadata(disk);
- G_RAID3_DEBUG(0, "Device %s: provider %s activated.",
+ G_RAID3_DEBUG(1, "Device %s: provider %s activated.",
sc->sc_name, g_raid3_get_diskname(disk));
break;
case G_RAID3_DISK_STATE_STALE:
@@ -3126,7 +3127,8 @@ g_raid3_create(struct g_class *mp, const struct g_raid3_metadata *md)
return (NULL);
}
- G_RAID3_DEBUG(0, "Device %s created (id=%u).", sc->sc_name, sc->sc_id);
+ G_RAID3_DEBUG(1, "Device %s created (%u components, id=%u).",
+ sc->sc_name, sc->sc_ndisks, sc->sc_id);
sc->sc_rootmount = root_mount_hold("GRAID3");
G_RAID3_DEBUG(1, "root_mount_hold %p", sc->sc_rootmount);