ddt.c (225736) | ddt.c (243674) |
---|---|
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 --- 7 unchanged lines hidden (view full) --- 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. | 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 --- 7 unchanged lines hidden (view full) --- 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. |
24 * Copyright (c) 2012 by Delphix. All rights reserved. |
|
24 */ 25 26#include <sys/zfs_context.h> 27#include <sys/spa.h> 28#include <sys/spa_impl.h> 29#include <sys/zio.h> 30#include <sys/ddt.h> 31#include <sys/zap.h> --- 1030 unchanged lines hidden (view full) --- 1062 void *cookie = NULL; 1063 1064 if (avl_numnodes(&ddt->ddt_tree) == 0) 1065 return; 1066 1067 ASSERT(spa->spa_uberblock.ub_version >= SPA_VERSION_DEDUP); 1068 1069 if (spa->spa_ddt_stat_object == 0) { | 25 */ 26 27#include <sys/zfs_context.h> 28#include <sys/spa.h> 29#include <sys/spa_impl.h> 30#include <sys/zio.h> 31#include <sys/ddt.h> 32#include <sys/zap.h> --- 1030 unchanged lines hidden (view full) --- 1063 void *cookie = NULL; 1064 1065 if (avl_numnodes(&ddt->ddt_tree) == 0) 1066 return; 1067 1068 ASSERT(spa->spa_uberblock.ub_version >= SPA_VERSION_DEDUP); 1069 1070 if (spa->spa_ddt_stat_object == 0) { |
1070 spa->spa_ddt_stat_object = zap_create(ddt->ddt_os, 1071 DMU_OT_DDT_STATS, DMU_OT_NONE, 0, tx); 1072 VERIFY(zap_add(ddt->ddt_os, DMU_POOL_DIRECTORY_OBJECT, 1073 DMU_POOL_DDT_STATS, sizeof (uint64_t), 1, 1074 &spa->spa_ddt_stat_object, tx) == 0); | 1071 spa->spa_ddt_stat_object = zap_create_link(ddt->ddt_os, 1072 DMU_OT_DDT_STATS, DMU_POOL_DIRECTORY_OBJECT, 1073 DMU_POOL_DDT_STATS, tx); |
1075 } 1076 1077 while ((dde = avl_destroy_nodes(&ddt->ddt_tree, &cookie)) != NULL) { 1078 ddt_sync_entry(ddt, dde, tx, txg); 1079 ddt_free(dde); 1080 } 1081 1082 for (enum ddt_type type = 0; type < DDT_TYPES; type++) { --- 70 unchanged lines hidden --- | 1074 } 1075 1076 while ((dde = avl_destroy_nodes(&ddt->ddt_tree, &cookie)) != NULL) { 1077 ddt_sync_entry(ddt, dde, tx, txg); 1078 ddt_free(dde); 1079 } 1080 1081 for (enum ddt_type type = 0; type < DDT_TYPES; type++) { --- 70 unchanged lines hidden --- |