summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason King <jason.brian.king@gmail.com>2017-07-28 22:57:35 +0000
committerJason King <jason.brian.king@gmail.com>2017-07-28 22:57:35 +0000
commit114cce701d05e73449f00758ae8dafbe196f4c07 (patch)
tree77ecc1abbf9b7800949fca47d802e22faf957512
parent2b6211c70cd9e899b15e259d53790f01e46bb88a (diff)
downloadillumos-joyent-OS-6255.tar.gz
OS-6255 mdb txg_list walker is not using CTFOS-6255
-rw-r--r--usr/src/cmd/mdb/common/modules/zfs/zfs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/cmd/mdb/common/modules/zfs/zfs.c b/usr/src/cmd/mdb/common/modules/zfs/zfs.c
index 10a2f5a4f7..c6b4ac2c4c 100644
--- a/usr/src/cmd/mdb/common/modules/zfs/zfs.c
+++ b/usr/src/cmd/mdb/common/modules/zfs/zfs.c
@@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011, 2016 by Delphix. All rights reserved.
+ * Copyright (c) 2017, Joyent, Inc. All rights reserved.
*/
/* Portions Copyright 2010 Robert Milkowski */
@@ -2461,6 +2462,11 @@ multilist_walk_init(mdb_walk_state_t *wsp)
return (WALK_NEXT);
}
+typedef struct mdb_txg_list {
+ size_t tl_offset;
+ txg_node_t *tl_head[TXG_SIZE];
+} mdb_txg_list_t;
+
typedef struct txg_list_walk_data {
uintptr_t lw_head[TXG_SIZE];
int lw_txgoff;
@@ -2473,11 +2479,12 @@ static int
txg_list_walk_init_common(mdb_walk_state_t *wsp, int txg, int maxoff)
{
txg_list_walk_data_t *lwd;
- txg_list_t list;
+ mdb_txg_list_t list;
int i;
lwd = mdb_alloc(sizeof (txg_list_walk_data_t), UM_SLEEP | UM_GC);
- if (mdb_vread(&list, sizeof (txg_list_t), wsp->walk_addr) == -1) {
+ if (mdb_ctf_vread(&list, "txg_list_t", "mdb_txg_list_t", wsp->walk_addr,
+ 0) == -1) {
mdb_warn("failed to read txg_list_t at %#lx", wsp->walk_addr);
return (WALK_ERR);
}