bptree.c (251631) | bptree.c (260150) |
---|---|
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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 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/* | 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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 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) 2012 by Delphix. All rights reserved. | 23 * Copyright (c) 2013 by Delphix. All rights reserved. |
24 */ 25 26#include <sys/arc.h> 27#include <sys/bptree.h> 28#include <sys/dmu.h> 29#include <sys/dmu_objset.h> 30#include <sys/dmu_tx.h> 31#include <sys/dmu_traverse.h> --- 104 unchanged lines hidden (view full) --- 136/* ARGSUSED */ 137static int 138bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, 139 const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) 140{ 141 int err; 142 struct bptree_args *ba = arg; 143 | 24 */ 25 26#include <sys/arc.h> 27#include <sys/bptree.h> 28#include <sys/dmu.h> 29#include <sys/dmu_objset.h> 30#include <sys/dmu_tx.h> 31#include <sys/dmu_traverse.h> --- 104 unchanged lines hidden (view full) --- 136/* ARGSUSED */ 137static int 138bptree_visit_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, 139 const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) 140{ 141 int err; 142 struct bptree_args *ba = arg; 143 |
144 if (bp == NULL) | 144 if (BP_IS_HOLE(bp)) |
145 return (0); 146 147 err = ba->ba_func(ba->ba_arg, bp, ba->ba_tx); 148 if (err == 0 && ba->ba_free) { 149 ba->ba_phys->bt_bytes -= bp_get_dsize_sync(spa, bp); 150 ba->ba_phys->bt_comp -= BP_GET_PSIZE(bp); 151 ba->ba_phys->bt_uncomp -= BP_GET_UCSIZE(bp); 152 } --- 73 unchanged lines hidden --- | 145 return (0); 146 147 err = ba->ba_func(ba->ba_arg, bp, ba->ba_tx); 148 if (err == 0 && ba->ba_free) { 149 ba->ba_phys->bt_bytes -= bp_get_dsize_sync(spa, bp); 150 ba->ba_phys->bt_comp -= BP_GET_PSIZE(bp); 151 ba->ba_phys->bt_uncomp -= BP_GET_UCSIZE(bp); 152 } --- 73 unchanged lines hidden --- |