aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zpool/zpool_main.c
diff options
context:
space:
mode:
authorvermavipinkumar <[email protected]>2021-05-26 00:02:07 +0530
committerBrian Behlendorf <[email protected]>2021-05-27 22:31:57 -0700
commitd6bedbbc44b86454d389bb9da40c9120060867d2 (patch)
treee59342a4cbbd5a6b748e76495fe9652beb26af9f /cmd/zpool/zpool_main.c
parentab6717cba6eb3516c499ae223d05c26df57dc4d7 (diff)
Propagate vdev state due to invalid label corruption
Propagate vdev child state to parents on invalid label Add VDEV_AUX_BAD_LABEL to print_import_config() Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Mark Maybee <[email protected]> Co-authored-by: Srikanth N S <[email protected]> Signed-off-by: Vipin Kumar Verma <[email protected]> Closes #12088
Diffstat (limited to 'cmd/zpool/zpool_main.c')
-rw-r--r--cmd/zpool/zpool_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 8d809acb2..d7d93c4da 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -32,6 +32,7 @@
* Copyright (c) 2017, Intel Corporation.
* Copyright (c) 2019, loli10K <[email protected]>
* Copyright (c) 2021, Colm Buckley <[email protected]>
+ * Copyright [2021] Hewlett Packard Enterprise Development LP
*/
#include <assert.h>
@@ -2379,6 +2380,10 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
(void) printf(gettext("all children offline"));
break;
+ case VDEV_AUX_BAD_LABEL:
+ (void) printf(gettext("invalid label"));
+ break;
+
default:
(void) printf(gettext("corrupted data"));
break;
@@ -2521,6 +2526,10 @@ print_import_config(status_cbdata_t *cb, const char *name, nvlist_t *nv,
(void) printf(gettext("all children offline"));
break;
+ case VDEV_AUX_BAD_LABEL:
+ (void) printf(gettext("invalid label"));
+ break;
+
default:
(void) printf(gettext("corrupted data"));
break;