metastat.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mdinclude.h"
typedef struct submirror_cb {
int un_nsm;
void
print_setname(int setno)
{
char setname[1024];
if (setno != 0) {
mdb_warn("failed to read setname at 0x%p\n",
}
}
}
void
{
int setno;
/* read in the device */
return;
}
mdb_printf("Concat/Stripe");
} else {
}
if (verbose) {
} else {
}
mdb_inc_indent(2);
mdb_dec_indent(2);
}
/* ARGSUSED */
int
{
return (WALK_ERR);
}
return (WALK_ERR);
}
/* this is one of the sub mirrors */
mdb_printf("Submirror %u: d%u ",
return (WALK_DONE);
}
}
return (WALK_NEXT);
}
void
{
void **ptr;
int setno = 0;
/* read in the device */
return;
}
if (verbose) {
} else {
}
mdb_inc_indent(2);
/*
* find the sub mirrors, search through each metadevice looking
* at the un_parent.
*/
mdb_warn("unable to walk units\n");
return;
}
mdb_dec_indent(2);
}
void
{
void **ptr;
void *addr;
int setno = 0;
int i;
/* read in the device */
return;
}
if (verbose) {
} else {
}
mdb_inc_indent(2);
/*
* find the sub components if any, search through each metadevice
* looking at the un_parent.
*/
continue;
}
mdb_warn("failed to read mdc_unit_t at %p",
un_addr);
continue;
}
if (sc_parent == un_self_id) {
/* this is one of the sub components */
mdb_printf("Subdevice %u ",
}
}
}
mdb_dec_indent(2);
}
void
{
int setno = 0;
int i;
/* read in the device */
return;
}
if (verbose) {
} else {
}
mdb_inc_indent(2);
mdb_inc_indent(2);
mdb_printf("Extent\tStart Block\tBlock count\n");
for (i = 0; i < mp.un_numexts; i++) {
return;
}
mdb_printf(" %d \t %llu\t %llu\n",
}
mdb_dec_indent(2);
mdb_dec_indent(2);
}
void
{
int setno = 0;
/* read in the device */
return;
}
if (verbose) {
} else {
}
}
void
{
switch (un_type) {
break;
case MD_METAMIRROR:
break;
case MD_METATRANS:
break;
case MD_METARAID:
break;
case MD_METASP:
break;
case MD_UNDEFINED:
break;
default:
break;
}
}
/* ARGSUSED */
/*
* usage: ::metastat [-v]
*/
int
{
snarf_sets();
!= argc) {
return (DCMD_USAGE);
}
if (!(flags & DCMD_ADDRSPEC)) {
argv) == -1) {
mdb_warn("failed to walk units");
return (DCMD_ERR);
}
return (DCMD_OK);
}
/* user passed set addr */
mdb_warn("failed to walk units");
return (DCMD_ERR);
}
return (DCMD_OK);
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
mdb_dec_indent(2);
}
return (DCMD_OK);
}