zpool_main.c (226583) | zpool_main.c (227497) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 7 unchanged lines hidden (view full) --- 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 7 unchanged lines hidden (view full) --- 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
|
24 */ 25 26#include <solaris.h> 27#include <assert.h> 28#include <ctype.h> 29#include <dirent.h> 30#include <errno.h> 31#include <fcntl.h> --- 2169 unchanged lines hidden (view full) --- 2201 &newchild, &children) != 0) 2202 return; 2203 2204 if (oldnv && nvlist_lookup_nvlist_array(oldnv, ZPOOL_CONFIG_CHILDREN, 2205 &oldchild, &c) != 0) 2206 return; 2207 2208 for (c = 0; c < children; c++) { | 25 */ 26 27#include <solaris.h> 28#include <assert.h> 29#include <ctype.h> 30#include <dirent.h> 31#include <errno.h> 32#include <fcntl.h> --- 2169 unchanged lines hidden (view full) --- 2202 &newchild, &children) != 0) 2203 return; 2204 2205 if (oldnv && nvlist_lookup_nvlist_array(oldnv, ZPOOL_CONFIG_CHILDREN, 2206 &oldchild, &c) != 0) 2207 return; 2208 2209 for (c = 0; c < children; c++) { |
2209 uint64_t ishole = B_FALSE; | 2210 uint64_t ishole = B_FALSE, islog = B_FALSE; |
2210 | 2211 |
2211 if (nvlist_lookup_uint64(newchild[c], 2212 ZPOOL_CONFIG_IS_HOLE, &ishole) == 0 && ishole) | 2212 (void) nvlist_lookup_uint64(newchild[c], ZPOOL_CONFIG_IS_HOLE, 2213 &ishole); 2214 2215 (void) nvlist_lookup_uint64(newchild[c], ZPOOL_CONFIG_IS_LOG, 2216 &islog); 2217 2218 if (ishole || islog) |
2213 continue; 2214 2215 vname = zpool_vdev_name(g_zfs, zhp, newchild[c], B_FALSE); 2216 print_vdev_stats(zhp, vname, oldnv ? oldchild[c] : NULL, 2217 newchild[c], cb, depth + 2); 2218 free(vname); 2219 } 2220 2221 /* | 2219 continue; 2220 2221 vname = zpool_vdev_name(g_zfs, zhp, newchild[c], B_FALSE); 2222 print_vdev_stats(zhp, vname, oldnv ? oldchild[c] : NULL, 2223 newchild[c], cb, depth + 2); 2224 free(vname); 2225 } 2226 2227 /* |
2228 * Log device section 2229 */ 2230 2231 if (num_logs(newnv) > 0) { 2232 (void) printf("%-*s - - - - - " 2233 "-\n", cb->cb_namewidth, "logs"); 2234 2235 for (c = 0; c < children; c++) { 2236 uint64_t islog = B_FALSE; 2237 (void) nvlist_lookup_uint64(newchild[c], 2238 ZPOOL_CONFIG_IS_LOG, &islog); 2239 2240 if (islog) { 2241 vname = zpool_vdev_name(g_zfs, zhp, newchild[c], 2242 B_FALSE); 2243 print_vdev_stats(zhp, vname, oldnv ? 2244 oldchild[c] : NULL, newchild[c], 2245 cb, depth + 2); 2246 free(vname); 2247 } 2248 } 2249 2250 } 2251 2252 /* |
|
2222 * Include level 2 ARC devices in iostat output 2223 */ 2224 if (nvlist_lookup_nvlist_array(newnv, ZPOOL_CONFIG_L2CACHE, 2225 &newchild, &children) != 0) 2226 return; 2227 2228 if (oldnv && nvlist_lookup_nvlist_array(oldnv, ZPOOL_CONFIG_L2CACHE, 2229 &oldchild, &c) != 0) --- 1330 unchanged lines hidden (view full) --- 3560 uint_t c; 3561 3562 /* 3563 * If the pool was faulted then we may not have been able to 3564 * obtain the config. Otherwise, if have anything in the dedup 3565 * table continue processing the stats. 3566 */ 3567 if (nvlist_lookup_uint64_array(config, ZPOOL_CONFIG_DDT_OBJ_STATS, | 2253 * Include level 2 ARC devices in iostat output 2254 */ 2255 if (nvlist_lookup_nvlist_array(newnv, ZPOOL_CONFIG_L2CACHE, 2256 &newchild, &children) != 0) 2257 return; 2258 2259 if (oldnv && nvlist_lookup_nvlist_array(oldnv, ZPOOL_CONFIG_L2CACHE, 2260 &oldchild, &c) != 0) --- 1330 unchanged lines hidden (view full) --- 3591 uint_t c; 3592 3593 /* 3594 * If the pool was faulted then we may not have been able to 3595 * obtain the config. Otherwise, if have anything in the dedup 3596 * table continue processing the stats. 3597 */ 3598 if (nvlist_lookup_uint64_array(config, ZPOOL_CONFIG_DDT_OBJ_STATS, |
3568 (uint64_t **)&ddo, &c) != 0 || ddo->ddo_count == 0) | 3599 (uint64_t **)&ddo, &c) != 0) |
3569 return; 3570 3571 (void) printf("\n"); | 3600 return; 3601 3602 (void) printf("\n"); |
3603 (void) printf(gettext(" dedup: ")); 3604 if (ddo->ddo_count == 0) { 3605 (void) printf(gettext("no DDT entries\n")); 3606 return; 3607 } 3608 |
|
3572 (void) printf("DDT entries %llu, size %llu on disk, %llu in core\n", 3573 (u_longlong_t)ddo->ddo_count, 3574 (u_longlong_t)ddo->ddo_dspace, 3575 (u_longlong_t)ddo->ddo_mspace); 3576 3577 verify(nvlist_lookup_uint64_array(config, ZPOOL_CONFIG_DDT_STATS, 3578 (uint64_t **)&dds, &c) == 0); 3579 verify(nvlist_lookup_uint64_array(config, ZPOOL_CONFIG_DDT_HISTOGRAM, --- 1062 unchanged lines hidden --- | 3609 (void) printf("DDT entries %llu, size %llu on disk, %llu in core\n", 3610 (u_longlong_t)ddo->ddo_count, 3611 (u_longlong_t)ddo->ddo_dspace, 3612 (u_longlong_t)ddo->ddo_mspace); 3613 3614 verify(nvlist_lookup_uint64_array(config, ZPOOL_CONFIG_DDT_STATS, 3615 (uint64_t **)&dds, &c) == 0); 3616 verify(nvlist_lookup_uint64_array(config, ZPOOL_CONFIG_DDT_HISTOGRAM, --- 1062 unchanged lines hidden --- |