zdb.c (2ad756a6bbb30fc98ee9000fba5bceec916a6c70) zdb.c (f7f4bd06a8d4e5d1e92d0d2905a68a2a03ed9c0c)
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

--- 5165 unchanged lines hidden (view full) ---

5174 ZPOOL_CONFIG_VDEV_TREE, &vdev_tree) != 0) ||
5175 (nvlist_lookup_uint64(vdev_tree,
5176 ZPOOL_CONFIG_ASHIFT, &ashift) != 0))
5177 ashift = SPA_MINBLOCKSHIFT;
5178
5179 if (nvlist_size(config, &size, NV_ENCODE_XDR) != 0)
5180 size = buflen;
5181
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

--- 5165 unchanged lines hidden (view full) ---

5174 ZPOOL_CONFIG_VDEV_TREE, &vdev_tree) != 0) ||
5175 (nvlist_lookup_uint64(vdev_tree,
5176 ZPOOL_CONFIG_ASHIFT, &ashift) != 0))
5177 ashift = SPA_MINBLOCKSHIFT;
5178
5179 if (nvlist_size(config, &size, NV_ENCODE_XDR) != 0)
5180 size = buflen;
5181
5182 /* If the device is a cache device clear the header. */
5182 /* If the device is a cache device read the header. */
5183 if (!read_l2arc_header) {
5184 if (nvlist_lookup_uint64(config,
5185 ZPOOL_CONFIG_POOL_STATE, &l2cache) == 0 &&
5186 l2cache == POOL_STATE_L2CACHE) {
5187 read_l2arc_header = B_TRUE;
5188 }
5189 }
5190

--- 4234 unchanged lines hidden ---
5183 if (!read_l2arc_header) {
5184 if (nvlist_lookup_uint64(config,
5185 ZPOOL_CONFIG_POOL_STATE, &l2cache) == 0 &&
5186 l2cache == POOL_STATE_L2CACHE) {
5187 read_l2arc_header = B_TRUE;
5188 }
5189 }
5190

--- 4234 unchanged lines hidden ---