From 114cce701d05e73449f00758ae8dafbe196f4c07 Mon Sep 17 00:00:00 2001 From: Jason King Date: Fri, 28 Jul 2017 22:57:35 +0000 Subject: OS-6255 mdb txg_list walker is not using CTF --- usr/src/cmd/mdb/common/modules/zfs/zfs.c | 11 +++++++++-- 1 file 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); } -- cgit v1.2.3