libzfs_status.c (219089) | libzfs_status.c (236884) |
---|---|
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 --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 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 */ | 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 --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 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 |
|
21/* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. | 22/* 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
24 * Copyright (c) 2012 by Delphix. All rights reserved. |
|
23 */ 24 25/* 26 * This file contains the functions which analyze the status of a pool. This 27 * include both the status of an active pool, as well as the status exported 28 * pools. Returns one of the ZPOOL_STATUS_* defines describing the status of 29 * the pool. This status is independent (to a certain degree) from the state of 30 * the pool. A pool's state describes only whether or not it is capable of --- 178 unchanged lines hidden (view full) --- 209 /* 210 * Newer on-disk version. 211 */ 212 if (vs->vs_state == VDEV_STATE_CANT_OPEN && 213 vs->vs_aux == VDEV_AUX_VERSION_NEWER) 214 return (ZPOOL_STATUS_VERSION_NEWER); 215 216 /* | 25 */ 26 27/* 28 * This file contains the functions which analyze the status of a pool. This 29 * include both the status of an active pool, as well as the status exported 30 * pools. Returns one of the ZPOOL_STATUS_* defines describing the status of 31 * the pool. This status is independent (to a certain degree) from the state of 32 * the pool. A pool's state describes only whether or not it is capable of --- 178 unchanged lines hidden (view full) --- 211 /* 212 * Newer on-disk version. 213 */ 214 if (vs->vs_state == VDEV_STATE_CANT_OPEN && 215 vs->vs_aux == VDEV_AUX_VERSION_NEWER) 216 return (ZPOOL_STATUS_VERSION_NEWER); 217 218 /* |
219 * Unsupported feature(s). 220 */ 221 if (vs->vs_state == VDEV_STATE_CANT_OPEN && 222 vs->vs_aux == VDEV_AUX_UNSUP_FEAT) { 223 nvlist_t *nvinfo; 224 225 verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_LOAD_INFO, 226 &nvinfo) == 0); 227 if (nvlist_exists(nvinfo, ZPOOL_CONFIG_CAN_RDONLY)) 228 return (ZPOOL_STATUS_UNSUP_FEAT_WRITE); 229 return (ZPOOL_STATUS_UNSUP_FEAT_READ); 230 } 231 232 /* |
|
217 * Check that the config is complete. 218 */ 219 if (vs->vs_state == VDEV_STATE_CANT_OPEN && 220 vs->vs_aux == VDEV_AUX_BAD_GUID_SUM) 221 return (ZPOOL_STATUS_BAD_GUID_SUM); 222 223 /* 224 * Check whether the pool has suspended due to failed I/O. --- 70 unchanged lines hidden (view full) --- 295 * Removed device 296 */ 297 if (find_vdev_problem(nvroot, vdev_removed)) 298 return (ZPOOL_STATUS_REMOVED_DEV); 299 300 /* 301 * Outdated, but usable, version 302 */ | 233 * Check that the config is complete. 234 */ 235 if (vs->vs_state == VDEV_STATE_CANT_OPEN && 236 vs->vs_aux == VDEV_AUX_BAD_GUID_SUM) 237 return (ZPOOL_STATUS_BAD_GUID_SUM); 238 239 /* 240 * Check whether the pool has suspended due to failed I/O. --- 70 unchanged lines hidden (view full) --- 311 * Removed device 312 */ 313 if (find_vdev_problem(nvroot, vdev_removed)) 314 return (ZPOOL_STATUS_REMOVED_DEV); 315 316 /* 317 * Outdated, but usable, version 318 */ |
303 if (version < SPA_VERSION) | 319 if (SPA_VERSION_IS_SUPPORTED(version) && version != SPA_VERSION) |
304 return (ZPOOL_STATUS_VERSION_OLDER); 305 306 return (ZPOOL_STATUS_OK); 307} 308 309zpool_status_t 310zpool_get_status(zpool_handle_t *zhp, char **msgid) 311{ --- 87 unchanged lines hidden --- | 320 return (ZPOOL_STATUS_VERSION_OLDER); 321 322 return (ZPOOL_STATUS_OK); 323} 324 325zpool_status_t 326zpool_get_status(zpool_handle_t *zhp, char **msgid) 327{ --- 87 unchanged lines hidden --- |