fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* needed to maintain identical _sd_bitmap_t sizes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * initialize cd filter options to this
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * to differentiate with kernel values in range [-1, sdbc_max_devs]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* initialize block filters to this */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteenum vartype { UINTTYPE = 0, ADDRTYPE, LOCKTYPE, CVTYPE };
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "HOST_CONFIGURED", 0xff, _SD_HOST_CONFIGURED },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "HOST_DECONFIGURED", 0xff, _SD_HOST_DECONFIGURED },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "FORCED_WRTHRU", NSC_FORCED_WRTHRU, NSC_FORCED_WRTHRU },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "NO_FORCED_WRTHRU", NSC_NO_FORCED_WRTHRU, NSC_NO_FORCED_WRTHRU },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * some cache general dcmds that do not use walkers
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_config(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(sdbc_version, "sdbc_version") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_version[16] = '\0'; /* make sure string is terminated */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_cache_config, "_sd_cache_config") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_cache_config symbol");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("user magic: %X kernel magic: %X (should match)\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "mirror host: %2d Block size: %4d threads %4d "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "write cache: %4dM\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("num_handles %4-d cache_mem %4dM prot_lru %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("gen_pattern %d fill_pattern %?-p num_nodes %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_net_config, "_sd_net_config") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_net_config symbol");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "psize %4-d configured %d csize %10-d wsize %10-d cpages %6d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_ft_data, "_sd_ft_data") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("crashed %d host_state <%b> numio %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("lock %?-p (owner) rem_sv %h-x sleep %?-p (owner)\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_node_hint, "_sd_node_hint") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_hit_percent(uint_t hits, uint_t misses, char *type)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%s hits: %u\t %s misses: %u\n", type, hits, type, misses);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* a little crude. anything less than 1 percent will show as 0 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%s hit rate: %lld %%\n", type, hit_rate);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_stats(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get the number of volumes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&maxdevs, "sdbc_max_devs") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte statssize = sizeof (_sd_stats_t) + (maxdevs - 1) *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte _sd_cache_stats = mdb_zalloc(statssize, UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_lookup_by_obj("sdbc", "_sd_cache_stats", &sym) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to lookup _sd_cache_stats symbol");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&_sd_cache_statsp, sizeof (uintptr_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(_sd_cache_stats, statssize, _sd_cache_statsp) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_stats_t structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Storage Device Block Cache Statistics\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-------------------------------------\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_hit_percent(_sd_cache_stats->st_rdhits, _sd_cache_stats->st_rdmiss,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_hit_percent(_sd_cache_stats->st_wrhits, _sd_cache_stats->st_wrmiss,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%3s %10s %8s %8s %8s %8s %8s %7s %4s %4s %s\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < maxdevs; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%3d %10s %7d %8d %8d %8d %8d %7d %4d %4d %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * display some variables and counters
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "PROCESS_CACHE_DM", (u_longlong_t)~0, PROCESS_CACHE_DM },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "CACHE_SHUTDOWN_DM", (u_longlong_t)~0, CACHE_SHUTDOWN_DM },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "CACHE_THREAD_TERMINATED_DM",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "TIME_DELAY_LVL0", (u_longlong_t)~0, TIME_DELAY_LVL0 },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "TIME_DELAY_LVL1", (u_longlong_t)~0, TIME_DELAY_LVL1 },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "TIME_DELAY_LVL2", (u_longlong_t)~0, TIME_DELAY_LVL2 },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "MONITOR_DYNMEM_PROCESS_DEFAULT",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (u_longlong_t)~0, MONITOR_DYNMEM_PROCESS_DEFAULT},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "RPT_SHUTDOWN_PROCESS_DM",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte RPT_SHUTDOWN_PROCESS_DM, RPT_SHUTDOWN_PROCESS_DM },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "RPT_DEALLOC_STATS1_DM",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "RPT_DEALLOC_STATS2_DM",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "PROCESS_DIRECTIVE_DEFAULT",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "WAKE_DEALLOC_THREAD_DM",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte WAKE_DEALLOC_THREAD_DM, WAKE_DEALLOC_THREAD_DM },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "MAX_OUT_ACCEL_HIST_FLAG_DM",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MAX_OUT_ACCEL_HIST_FLAG_DM, MAX_OUT_ACCEL_HIST_FLAG_DM},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_vars(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* in no particular order ... */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* some addresses of various lists and tables */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte display_var("_sdbc_gl_centry_info_nvmem", ADDRTYPE);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte display_var("_sdbc_gl_centry_info_size", ADDRTYPE); /* size_t */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte display_var("_sdbc_gl_file_info_size", ADDRTYPE); /* size_t */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* dynamic memory variables */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Dynamic Memory variables and stats:\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte display_var("_sdbc_memtype_deconfigure_delayed", UINTTYPE);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&sd_dealloc_flag_dm, "sd_dealloc_flag_dm") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read sd_dealloc_flag_dm symbol");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&dynmem_processing_dm, "dynmem_processing_dm") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read dynmem_processing_dm structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "thread_dm_cv %h-x thread_dm_lock %?-p (owner)\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sd_dealloc_flagx %x %8Tmax_dyn_list %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "cache_aging_ct1 %3-d %8Tcache_aging_ct2 %3-d cache_aging_ct3 %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "cache_aging_sec1 %3-d %8Tcache_aging_sec2 %3-d"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " cache_aging_sec3 %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cache_aging_pcnt1 %3-d %8Tcache_aging_pcnt2 %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "max_holds_pcnt %3-d %8Talloc_ct %8-d dealloc_ct %8-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "history %4x %8Tnodatas %8-d notavail %8-d candidates %8-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "deallocs %8-d %8Thosts %8-d pests %8-d metas %8-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("read_hits %8-d %8Tread_misses %8-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "write_thru %8-d %8Twrite_hits %8-d write_misses %8-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("prefetch_hits %8-d prefetch_misses %8-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* some locks and condition variables */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"FORCED_WRTHRU", NSC_FORCED_WRTHRU, NSC_FORCED_WRTHRU},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * HELP functions for cache ctl type dcmds
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-c cd displays cctls for cache descriptor 'cd'\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-b blk displays cctls for cache block number 'blk'\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-d displays cctls with dirty bits\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-h displays cctls that are hashed\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-i displays cctls that are inuse\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-o displays cctls that have I/O in progress\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-p displays cctls that have pagio set\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-B displays cctls that are marked BAD\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-H displays cctls that are HOSTS\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-P displays cctls that are PARASITES\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-R displays cctls that are explicit (NSC_RDAHEAD) "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Prefetch bufs\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-r displays cctls that are implicit Prefetch bufs\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-V displays cctls that have valid bits set\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Default: %s displays all cctls in the list\n", name);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%s -io -c 5 displays all cctls for cd 5 that are\n"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CCTL_OPTIONSTRING "[-vdhiopBHPV][-c cd][-b blknum]"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_cctl displays cache ctl structures\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_cctl " CCTL_OPTIONSTRING "\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_cchain displays cache ctl structures in a"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " (alloc) cc_chain\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: address::sdbc_cchain " CCTL_OPTIONSTRING "\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_dchain displays cache ctl structures in a"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " dirty chain\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: address::sdbc_dchain " CCTL_OPTIONSTRING "\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_dmchain displays cache ctl structures in a"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " dynamic memory allocation chain\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "the cctl represented by the given address,\n"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "the cc_head_dm cctl,\n"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "the chain starting at cc_next_dm of the head cctl\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: address::sdbc_dmchain " CCTL_OPTIONSTRING "\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_hashchain displays cache ctl structures in a"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " hash chain\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: address::sdbc_hashchain " CCTL_OPTIONSTRING "\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_hashtable displays the hash table and its chains\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: address::sdbc_hashtable " CCTL_OPTIONSTRING "\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_lru displays cache ctl structures in the LRU queue\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_lru " CCTL_OPTIONSTRING "\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * help functions for write ctl dcmds
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-c cd show ctl structs for cache descriptor 'cd'\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-d show ctl structs that have dirty bits set\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Default: %s displays all write ctl in the list\n", name);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "sdbc_wctl displays the allocated array of write ctl structures\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_wctl [-vd][-c cd]\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_wrq displays the write ctl queue (wctl free list)\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_wrq [-vd][-c cd]\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* help function for the sdbc_cdinfo dcmd */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "sdbc_cdinfo displays cd information from the _sd_cache_files table\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_cdfinfo [-av][-c cd]\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-a displays info for all cd_info structures\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-c cd displays info for cache descriptor 'cd'\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Default: display info for cd's that are allocated\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "sdbc_ftctl displays the array of fault tolerant structures \n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_ftctl [-vd][-c cd]\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * help function for the sdbc_handles dcmd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_handles displays active or allocated"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " cache buffer handles\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_handles [-avC][-c cd]\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-v displays detailed handle data\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Default: display only allocated or active handles\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * help functions for the "global" memory dcmds
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_glcinfo displays the global cache entry info\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_glcinfo [-adC][-c cd][-b fbapos]\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-a displays all global info structs\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-b fbapos displays structs that match FBA block"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "(not cache block) 'fbapos'\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-c cd displays structs that match cache descriptor 'cd'\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-d displays structs with dirty bits set\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-C does consistency check against nvram copy\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Default: display entries with a valid cd\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("sdbc_glfinfo displays the global file info\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Usage: [address]::sdbc_glfinfo [-aptC]\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-a displays all global info structs\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-p displays structs for pinned volumes\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-t displays structs for attached volumes\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("-C does consistency check against nvram copy\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("Default: display entries with non-null filename\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walker for the cctl list using the cc_link_list_dm pointers
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte _sd_cctl_t *_sd_cctl[_SD_CCTL_GROUPS]; /* for getting first entry */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * we get the "first" cctl from memory and then traverse
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the cc_link_list_dm pointers.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this traversal could start from any cctl. here we start with
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the first cctl in the _sd_cctl[] array.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (wsp->walk_addr == NULL) /* should not happen */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * w_start is 0 on the first iteration so the test
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * will fail, allowing the first centry to be processed
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(¢ry, sizeof (_sd_cctl_t), wsp->walk_addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read centry at %p", wsp->walk_addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte wsp->walk_addr = (uintptr_t)(centry.cc_link_list_dm);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* set termination condition. only needs to be done once */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the cc_chain list of a _sd_cctl_t
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * no global walks -- must be called with an address
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte wsp->walk_data = mdb_zalloc(sizeof (_sd_cctl_t), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(wsp->walk_data, sizeof (_sd_cctl_t), wsp->walk_addr)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("sdbc_cchain_wstep failed to read centry at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the dirty chain list of a _sd_cctl_t
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * no global walks -- must be called with an address
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte wsp->walk_data = mdb_zalloc(sizeof (_sd_cctl_t), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* walk data stores the first and subsequent cc_dirty_link */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(wsp->walk_data, sizeof (_sd_cctl_t), wsp->walk_addr)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("sdbc_dchain_winit failed to read centry at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(¢ry, sizeof (_sd_cctl_t), wsp->walk_addr)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("sdbc_dchain_wstep failed to read centry at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* end of dirty_next chain? start on subsequent dirty_link */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (uintptr_t)(((_sd_cctl_t *)(wsp->walk_data))->cc_dirty_link);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* update dirty link */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* walk data stores the first and subsequent cc_dirty_link */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(wsp->walk_data, sizeof (_sd_cctl_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "sdbc_dchain_wstep failed to read centry at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* for stepping thru the dynmem chain */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the dm chain of a cctl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * start with current address, then cc_head_dm, then the cc_next_dm chain
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(¢ry, sizeof (_sd_cctl_t), wsp->walk_addr)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("sdbc_dmchain_wstep failed to read centry at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk a hash chain
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * requires an address
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&hash_entry, sizeof (_sd_hash_hd_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "sdbc_hashchain_wstep failed to read hash_entry at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (WALK_ERR); /* will upper layer continue ? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the sdbc lru list
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* if called without an address, start at the head of the queue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_lookup_by_obj("sdbc", "_sd_lru_q", &sym) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* &(_sd_lru_q.sq_qhead) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (wsp->walk_addr == NULL) /* should not happen */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * w_start is 0 on the first iteration so the test
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * will fail, allowing the first centry to be processed
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(¢ry, sizeof (_sd_cctl_t), wsp->walk_addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read centry at %p", wsp->walk_addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* set termination condition. only needs to be done once */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the array of allocated write control structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* need to calculate the end of the array */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_net_config, "_sd_net_config") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_net_config structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte wsp->walk_addr = (uintptr_t)(_sd_net_config.sn_wr_cctl);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this module assumes 8k block size so this code can
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * be commented out if necessary.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&blk_shft, "_sd_cblock_shift") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "assuming 8k cache block size");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte count = (_sd_net_config.sn_wpages * _sd_net_config.sn_psize) /
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo->w_end = (uintptr_t)(_sd_net_config.sn_wr_cctl + count);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the queue (free list) of write control structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* if called without an address, start at the head of the queue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_net_config, "_sd_net_config") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_net_config structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&wctl, sizeof (_sd_wr_cctl_t), wsp->walk_addr)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("sdbc_cchain_wstep failed to read wctl at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* special case -- mini-DSP fake wr_cctl */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SAFESTORE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the _sd_cache_files array of cd_info structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get the address of the cdinfo table */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_cache_files_addr, "_sd_cache_files") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_cache_files address\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* if called without an address, start at the head of the queue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* address of first _sd_cd_info_t */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte wsp->walk_addr = (uintptr_t)(_sd_cache_files_addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get the number of volumes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&maxdevs, "sdbc_max_devs") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo->w_end = (uintptr_t)(_sd_cache_files_addr + maxdevs);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the array of allocated fault tolerant control structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* need to calculate the end of the array */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_net_config, "_sd_net_config") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_net_config structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte wsp->walk_addr = (uintptr_t)(_sd_net_config.sn_ft_cctl);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this module assumes 8k block size so this code can
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * be commented out if necessary.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&blk_shft, "_sd_cblock_shift") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "assuming 8k cache block size");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte count = (_sd_net_config.sn_wpages * _sd_net_config.sn_psize) /
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo->w_end = (uintptr_t)(_sd_net_config.sn_ft_cctl + count);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SAFESTORE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the handle list
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_handle_list structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_lookup_by_obj("sdbc", "_sd_handle_list", &sym) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to lookup _sd_handle_list symbol");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* if called without an address, start at first element in list */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo->w_end = (uintptr_t)(sym.st_value); /* &_sd_handle_list.hl_top */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&handle, sizeof (_sd_buf_handle_t), wsp->walk_addr)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read handle at %p", wsp->walk_addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the global info array (dirty bits)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get start of the cache entry metadata */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&gl_centry_info, "_sdbc_gl_centry_info") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* need to calculate the end of the array */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sdbc_gl_centry_info_size");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo->w_end = ((uintptr_t)(gl_centry_info)) + gl_centry_info_size;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * walk the global file info array
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo = mdb_zalloc(sizeof (struct walk_info), UM_SLEEP);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get start of the cache entry metadata */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&gl_file_info, "_sdbc_gl_file_info") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get the number of volumes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&maxdevs, "sdbc_max_devs") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* end of the array */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte winfo->w_end = (uintptr_t)((gl_file_info) + maxdevs);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_free(wsp->walk_data, sizeof (struct walk_info));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* end of WALKERS section */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"FOUND_IN_HASH", FOUND_IN_HASH_DM, FOUND_IN_HASH_DM},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"FOUND_HOLD_OVER", FOUND_HOLD_OVER_DM, FOUND_HOLD_OVER_DM},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"PARASITIC_ENTRY", PARASITIC_ENTRY_DM, PARASITIC_ENTRY_DM},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"STICKY_METADATA", STICKY_METADATA_DM, STICKY_METADATA_DM},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"ELIGIBLE_ENTRY", ELIGIBLE_ENTRY_DM, ELIGIBLE_ENTRY_DM},
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* DCMDS that use walkers */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display cache entry control structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t opt_R = FALSE; /* explicit read-ahead (prefetch) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t opt_r = FALSE; /* implicit read-ahead (prefetch) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t nofilter = FALSE; /* true if b, d, h, i, o, p, V are all false */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * possible enhancements -- option to filter on flag bits
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * option that toggles other options.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte nofilter = (!OPT_B_SELECTED && !opt_d && !opt_h && !opt_i &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte !opt_o && !opt_m && !opt_p && !opt_V && !opt_B &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte !opt_P && !opt_H && !opt_R && !opt_r); /* no options */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_walk_dcmd("sdbc`sdbc_cctl", "sdbc`sdbc_cctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(¢ry, sizeof (_sd_cctl_t), addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("dcmd failed to read centry at %p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* filter exclusively on a cd number if specified */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (OPT_C_SELECTED && (centry.cc_head.hh_cd != opt_c))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* all other filters are inclusive */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (OPT_B_SELECTED && (centry.cc_head.hh_blk_num == opt_b)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (opt_H && (centry.cc_aging_dm & HOST_ENTRY_DM)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (opt_P && (centry.cc_aging_dm & PARASITIC_ENTRY_DM)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (opt_R && (centry.cc_aging_dm & PREFETCH_BUF_E)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (opt_r && (centry.cc_aging_dm & PREFETCH_BUF_I)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "%-?p cd %3-d blk_num %10-d valid %04hx dirty %04hx flag %02x\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* verbose */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "hashed %d seq %4-d toflush %04hx %8Tawait_use %4-d await_page %4-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte centry.cc_iocount, centry.cc_iostatus, io_status_bits);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&cc_sync, sizeof (struct _sd_cctl_sync),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read cc_sync"); /* not catastophic */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cc_sync blkcv: %h-x %8Tlock: 0x%p (owner)\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("aging_dm age %3d %4Tage flags: <%b> 0x%x\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte centry.cc_aging_dm, cc_aging_bits, centry.cc_aging_dm);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("alloc_ct_dm %10-d dealloc_ct_dm %10-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* pointers */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte centry.cc_next, centry.cc_prev, centry.cc_chain);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* dynmem chain */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cctl dmqueue index cc_blocks %4-d\n", centry.cc_cblocks);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte centry.cc_anon_addr.sa_virt, centry.cc_anon_len);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("hits %8-d creat time %?-p\n", centry.cc_hits,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * convenience dcmd to display the _sd_cctl cc_chain list (alloc list)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Must be called with an address of a cache entry (_sd_cctl_t)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * same options as sdbc_cctl().
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * alternatively the user can call the sdbc_cchain walker
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and pipe the addresses to sdbc_cctl dcmd.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_cchain(uintptr_t addr, uint_t flags, int argc,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_pwalk_dcmd("sdbc`sdbc_cchain", "sdbc`sdbc_cctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to walk cc_chain at addr %p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * convenience dcmd to cdisplay the _sd_cctl dirty chain
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * (which is really a 2d chain).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Must be called with an address of a cache entry (_sd_cctl_t)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * same options as sdbc_cctl().
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * alternatively the user can call the sdbc_dchain walker
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and pipe the addresses to sdbc_cctl dcmd.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_dchain(uintptr_t addr, uint_t flags, int argc,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_pwalk_dcmd("sdbc`sdbc_dchain", "sdbc`sdbc_cctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to walk dirty chain at addr %p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * convenience dcmd to display the _sd_cctl dm chain list
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Must be called with an address of a cache entry (_sd_cctl_t)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * same options as sdbc_cctl().
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * alternatively the user can call the sdbc_dmchain walker
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and pipe the addresses to sdbc_cctl dcmd.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_dmchain(uintptr_t addr, uint_t flags, int argc,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_pwalk_dcmd("sdbc`sdbc_dmchain", "sdbc`sdbc_cctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to walk dm chain at addr %p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to walk a hash chain
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * requires an address. same options as sdbc_cctl dcmd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_hashchain(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_pwalk_dcmd("sdbc`sdbc_hashchain", "sdbc`sdbc_cctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to walk hashchain at %p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortedisplay_hash_table(_sd_hash_table_t *addr, _sd_hash_table_t *ht)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("size %7-d bits %2-d mask %8-x nmask %8-x buckets %p\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortedisplay_hash_bucket(_sd_hash_bucket_t *addr, _sd_hash_bucket_t *hb)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read bucket lock at %p", hb->hb_lock);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("inlist %d seq %d\n", hb->hb_inlist, hb->hb_seq);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to walk the hash table
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * defaults to _sd_htable the cache hash table,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * but wil accept an address which is probably only useful
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * in the event that other hash tables are implemented in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the cache.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * calls sdbc_hashchain dcmd. same options as sdbc_cctl dcmd.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_hashtable(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get the address of the standard cache hash table */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&sd_htable_addr, "_sd_htable") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* read in the hash table structure */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&_sd_htable, sizeof (_sd_hash_table_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_htable structure at %p\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * read in the hash buckets
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and display chains if there are any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&hash_bucket, sizeof (_sd_hash_bucket_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if this walk fails, continue trying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * to read hash buckets
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "failed to walk hash chain at %p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display the sdbc lru queue
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * same options as sdbc_cctl().
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * alternatively the user can call the sdbc_lru walker
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and pipe the addresses to sdbc_cctl dcmd.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_lookup_by_obj("sdbc", "_sd_lru_q", &sym) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "qlock: 0x%-p (owner) await %d seq %d inq %d req %d noreq %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_pwalk_dcmd("sdbc`sdbc_lru", "sdbc`sdbc_cctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("qtop %-p qlock: %-p (owner) inq %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("slp_top %3-d slp_index %3-d slp_inq %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; verbose && i < SD_WR_SLP_Q_MAX; i += 2) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%3d: cv %h-x wq_need %3-d wq_held %3-d%4T",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "%3d: cv %h-x wq_need %3-d wq_held %3-d%\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display write control structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* TODO option for fba pos */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_walk_dcmd("sdbc`sdbc_wctl", "sdbc`sdbc_wctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&wctl, sizeof (_sd_wr_cctl_t), addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * print "all" is the default.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * filter conditions can only be checked by reading in wc_gl_info
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&gl_info, sizeof (ss_centry_info_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read at wc_gl_info 0x%p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%-p data %-p gl_info %-p Ngl_info %-p flg %02x\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* verbose */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("next %?-p prev %?-p\n", wctl.wc_next, wctl.wc_prev);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cd %3-d fpos %10-d dirty %04x flag <%b>\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte gl_info.gl_cd, gl_info.gl_fpos, gl_info.gl_dirty & 0xffff,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&nv_gl_info, sizeof (ss_centry_info_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read at wc_nvmem_gl_info 0x%p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte wctl.wc_nvmem_gl_info); /* not catastophic, continue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* consistency check */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sizeof (ss_centry_info_t) != 0)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("nvram and host memory are NOT identical!");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cd %3-d fpos %10-d dirty %04x flag <%b>\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display write control structures in the free list
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * same options as sdbc_wctl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_wrq(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* look for verbose option */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&_sd_net_config, "_sd_net_config") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_net_config structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte addr = (uintptr_t)(_sd_net_config.sn_wr_queue.wq_qtop);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_pwalk_dcmd("sdbc`sdbc_wrq", "sdbc`sdbc_wctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to walk write ctl queue at addr %p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display the dm queues
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * use sdbc_lru walker to walk each queue.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_dmqueues(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte _sd_queue_t *sdbc_dm_queues; /* kernel address of dm queues */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&sdbc_dm_queues, "sdbc_dm_queues") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read sdbc_dm_queues address\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_readvar(&max_dm_queues, "max_dm_queues") == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read max_dm_queues variable\n");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte queues = mdb_zalloc(max_dm_queues * sizeof (_sd_queue_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortemdb_printf("max_dm_queues %d sdbc_dm_queues %p queues %p\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(queues, max_dm_queues * sizeof (_sd_queue_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < max_dm_queues; ++i) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "seq %d inq %d req %d noreq %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "CREATE ", (u_longlong_t)~0, _SD_WRITER_CREATE },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "RUNNING", (u_longlong_t)~0, _SD_WRITER_RUNNING },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "ALLOC_IN_PROGRESS", CD_ALLOC_IN_PROGRESS, CD_ALLOC_IN_PROGRESS },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "CLOSE_IN_PROGRESS", CD_CLOSE_IN_PROGRESS, CD_CLOSE_IN_PROGRESS },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display cd information
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_cdinfo(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *fn = "nopath"; /* filename if sd_shared info cannot be read */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t sh_alloc = 0; /* assume not alloc'd if sd_shared info unavail */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dev_t_chars = sizeof (dev_t) * 2; /* # chars to display dev_t */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_walk_dcmd("sdbc`sdbc_cdinfo", "sdbc`sdbc_cdinfo",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&cdi, sizeof (_sd_cd_info_t), addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read cd info at 0x%p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * need to do this read even for non-verbose option to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * get the filename and the sh_alloc field
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read shared cd info at 0x%p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* not catastrophic, keep truckin' */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* verbose */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("rawfd %?-p crdev %0*lx iodev %?-p\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("last_ent %?-p lastchain_ptr %?-p lastchain %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("io_head %?-p io_tail %?-p fail_head %?-p\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cdi.cd_io_head, cdi.cd_io_tail, cdi.cd_fail_head);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "cd_info %?-p failover %d recovering %d write_inprogress %d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cd_global: %s\n", gl_file.sv_volname);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("pinned %2-d attached %2-d devidsz %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* TODO do a consistency check here against the nvram copy */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cache_read %10-d cache_write %10-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sd_shared.sh_cache_read, sd_shared.sh_cache_write);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("disk_read %10-d disk_write %10-d filesize %10-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("numdirty %8-d numio %8-d numfail %8-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sd_shared.sh_flushloop, sd_shared.sh_flag, sh_flag_bits);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* this can be really verbose */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* TODO reconstruct argv without opt_a */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte else /* print with no options */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* TODO reconstruct argv without opt_a */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte else /* print with no options */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* TODO reconstruct argv without opt_a */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte else /* print with no options */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display fault tolerant control structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_ftctl(uintptr_t addr, uint_t flags, int argc,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* TODO option to select on fpos */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_walk_dcmd("sdbc`sdbc_ftctl", "sdbc`sdbc_ftctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&ft_cent, sizeof (_sd_ft_cctl_t), addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read ft_cent at 0x%p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * print "all" is the default.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * filter conditions can only be checked by reading in wc_gl_info
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&gl_info, sizeof (ss_centry_info_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read at wc_gl_info 0x%p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* verbose */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cd %3-d fpos %10-d dirty %04x flag <%b>\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte gl_info.gl_cd, gl_info.gl_fpos, gl_info.gl_dirty & 0xffff,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&nv_gl_info, sizeof (ss_centry_info_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read at ft_nvmem_gl_info 0x%p",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ft_cent.ft_nvmem_gl_info); /* not catastophic, continue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("cd %3-d fpos %10-d dirty %04x flag <%b>\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* consistency check */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (memcmp(&gl_info, &nv_gl_info, sizeof (ss_centry_info_t))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("nvram and host memory are NOT identical!");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SAFESTORE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* dcmd to display buffer handles */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_handles(uintptr_t addr, uint_t flags, int argc,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sd_handle_list structure");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_walk_dcmd("sdbc`sdbc_handles", "sdbc`sdbc_handles",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("hl_top.bh_next: 0x%p\n", hl.hl_top.bh_next);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("hl_lock: 0x%p (owner)\n", hl.hl_lock._opaque[0]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read buf handle at 0x%p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!opt_a && !(bh.bh_flag & (NSC_HALLOCATED | NSC_HACTIVE)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * may get false matches on cd option --
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * a cleared bh_cd field will match if user specified cd 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%p %8T cd %3-d %4T<%b> %x\n", addr, bh.bh_cd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* check for verbose, avoid printing twice */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (uintptr_t)bh.bh_centry, DCMD_ADDRSPEC, 0, NULL);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* verbose */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte bh.bh_disconnect_cb, bh.bh_read_cb, bh.bh_write_cb);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("fd 0x%p pos %10d len %6d flag 0x%x\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte bh.bh_buf.sb_fd, bh.bh_fba_pos, bh.bh_fba_len, bh.bh_flag);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("alloc_thread %p busy_thread %p\n", bh.bh_alloc_thread,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("err %4d %8T bh_vec 0x%p\n", bh.bh_error, bh.bh_vec);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("bufvec (scatter gather list): %-?s %8T%-s\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* todo check for (bh_vec != bh_bufvec) => readahead? */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%p %8T%d\n", bv->bufaddr, bv->buflen);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (uintptr_t)bh.bh_centry, DCMD_ADDRSPEC, 0, NULL);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display ss_centry_info_t structures and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * do optional consistency check with the nvram copy
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if configured for nvram safe storage.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_glcinfo(uintptr_t addr, uint_t flags, int argc,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* for doing consistency check */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* options */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uintptr_t opt_b = MDB_BLKNUM; /* fba pos match */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_walk_dcmd("sdbc`sdbc_glcinfo", "sdbc`sdbc_glcinfo",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to walk global centry info array");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&gl_centry_info, sizeof (ss_centry_info_t), addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read gl_centry_info at 0x%p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * default is to print entries initialized with a cd. return if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * no options are selected and cd is invalid.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!opt_a && (!OPT_B_SELECTED) && (!OPT_C_SELECTED) && !opt_d &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * opt_c is exclusive filter. if opt_c is selected and there
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * is no match on the cd then return
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (OPT_C_SELECTED && (gl_centry_info.sc_cd != opt_c)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * opt_d and opt_b are inclusive. print if either one is chosen
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and the selection condition is true.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (!opt_d && (!OPT_B_SELECTED)) || /* no options chosen */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (OPT_B_SELECTED && (gl_centry_info.sc_fpos == opt_b)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%?-p cd %3-d fpos %10-d dirty %04x flag <%b>\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get start of the cache entry metadata */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* not catastrophic */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get start of the nvram copy cache entry metadata */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sdbc_gl_centry_info_nvmem");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* not catastrophic */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte nv_addr = (addr - (uintptr_t)gl_centry_info_start) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&nv_gl_centry_info, sizeof (ss_centry_info_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* not catastophic, continue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* consistency check */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sizeof (ss_centry_info_t) != 0)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "nvram and host memory are NOT identical!");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "%?-p cd %3-d fpos %10-d dirty %04x flag <%b>\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * dcmd to display ss_voldata_t structures and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * do optional consistency check with the nvram copy
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if configured for nvram safe storage.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesdbc_glfinfo(uintptr_t addr, uint_t flags, int argc,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* for doing consistency check */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* options default: valid filename */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * possible enhancement -- match on filename,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or filename part (e.g. controller number)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_walk_dcmd("sdbc`sdbc_glfinfo", "sdbc`sdbc_glfinfo",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to walk global file info array");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&gl_file_info, sizeof (ss_voldata_t), addr) == -1) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read gl_file_info at 0x%p", addr);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * default is to print entries initialized with non-null filename.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * return if no options are selected and filename is invalid.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (opt_p && (gl_file_info.sv_pinned != _SD_NO_HOST)) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (opt_t && (gl_file_info.sv_attached != _SD_NO_HOST)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("%?-p %s\n", addr, gl_file_info.sv_volname);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("pinned %2-d attached %2-d devidsz %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get start of the cache entry metadata */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* not catastrophic */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* get start of the nvram copy cache entry metadata */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("failed to read _sdbc_gl_file_info_nvmem");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* not catastrophic */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte nv_addr = (addr - (uintptr_t)gl_file_info_start) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (mdb_vread(&nv_gl_file_info, sizeof (ss_voldata_t),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* not catastophic, continue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* consistency check */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sizeof (ss_centry_info_t) != 0)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_warn("nvram and host memory are NOT identical!");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("pinned %2-d attached %2-d devidsz %3-d\n",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdb_printf("devid %s\n", nv_gl_file_info.sv_devid);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * MDB module linkage information:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * We declare a list of structures describing our dcmds, and a function
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * named _mdb_init to return a pointer to our module information.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* general dcmds */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display sdbc configuration information",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display sdbc stats information",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display some sdbc variables, counters and addresses",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* cctl dcmds */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display sdbc cache ctl structures",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display cache ctl structure cc_chain",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display cache ctl structure dirty chain",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display dynamic memory cache ctl chain",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"sdbc_hashchain", ":[-vdhioV][-c cd][-b blknum]",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display a hash chain", sdbc_hashchain, hashchain_help },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte {"sdbc_hashtable", "?[-vdhioV][-c cd][-b blknum]",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display hash table", sdbc_hashtable, hashtable_help },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display the cache lru queue",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* wctl dcmds */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display the write control structures",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display the write control queue",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SAFESTORE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* others */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display cache descriptor information",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display the fault tolerant control structures",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SAFESTORE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display sdbc buffer handle information",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display sdbc dynamic memory buffer queues information",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* "global" metadata dcmds */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display the global cache entry info structures",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "display the global file info structures",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* walkers of cctl list and arrays */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_cchain", "walk the cc_chain (alloc chain) of a cache ctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_cchain_winit, sdbc_cchain_wstep, sdbc_cchain_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_cctl", "walk the cache ctl structure list",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_cctl_winit, sdbc_cctl_wstep, sdbc_cctl_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_dchain", "walk the dirty chain of a cache ctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_dchain_winit, sdbc_dchain_wstep, sdbc_dchain_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_dmchain", "walk the dynamic memory chain of a cache cctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_dmchain_winit, sdbc_dmchain_wstep, sdbc_dmchain_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_lru_winit, sdbc_lru_wstep, sdbc_lru_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* walkers of wctl lists and arrays */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_wctl", "walk the allocated write ctl array",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_wctl_winit, sdbc_wctl_wstep, sdbc_wctl_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_wrq", "walk the write ctl queue (free list)",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_wrq_winit, sdbc_wrq_wstep, sdbc_wrq_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SAFESTORE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* others */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_cdinfo",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "walk the _sd_cache_files array of cache descriptor information",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_cdinfo_winit, sdbc_cdinfo_wstep, sdbc_cdinfo_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_ftctl",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "walk the allocated array of fault tolerant structures",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_ftctl_winit, sdbc_ftctl_wstep, sdbc_ftctl_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* SAFESTORE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_handles", "walk array of _sd_buf_handle_t structures",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_handle_winit, sdbc_handle_wstep, sdbc_handle_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* walkers for metadata arrays */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_glcinfo", "walk the allocated global cache entry info array",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sdbc_glcinfo_winit, sdbc_glcinfo_wstep, sdbc_glcinfo_wfini },
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte { "sdbc_glfinfo", "walk the allocated global file info array",