summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev.c
diff options
context:
space:
mode:
authorPavel Zakharov <[email protected]>2016-09-14 11:01:40 -0400
committerBrian Behlendorf <[email protected]>2018-05-14 14:32:49 -0400
commit38a19edd34f6a3fc0c8d0f6b9750fc2df2856c9f (patch)
tree92b240d1deee9efddbc699ca0327da51ca86ce56 /module/zfs/vdev.c
parentdb7d07e14ba4b964f64058e2c3d121d32f8d53c4 (diff)
OpenZFS 9189 - Add debug to vdev_label_read_config when txg check fails
These changes were added to help debug issue #9187. Essentially, in the original bug, vdev_validate() seems to fails in vdev_label_read_config() and prints "failed reading config". This could happen because either: 1. The labels are actually corrupt and zio_wait() fails for all of them 2. The labels were discarded because they didn't pass the txg check. Beyond 9187, having debug info when case 2 happens could be useful in other scenarios, such as zpool import. Authored by: Pavel Zakharov <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Prashanth Sreenivasa <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Approved by: Matt Ahrens <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://illumos.org/issues/9189 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/f6af1b7 Closes #7533
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r--module/zfs/vdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index cebac3bb9..7bb27f0ec 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -1704,7 +1704,8 @@ vdev_validate(vdev_t *vd)
if ((label = vdev_label_read_config(vd, txg)) == NULL) {
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_BAD_LABEL);
- vdev_dbgmsg(vd, "vdev_validate: failed reading config");
+ vdev_dbgmsg(vd, "vdev_validate: failed reading config for "
+ "txg %llu", (u_longlong_t)txg);
return (0);
}