Deleted Added
full compact
bpobj.c (219089) bpobj.c (228103)
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 * Copyright (c) 2005, 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

--- 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 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2011 by Delphix. All rights reserved.
23 */
24
25#include <sys/bpobj.h>
26#include <sys/zfs_context.h>
27#include <sys/refcount.h>
24 */
25
26#include <sys/bpobj.h>
27#include <sys/zfs_context.h>
28#include <sys/refcount.h>
29#include <sys/dsl_pool.h>
28
29uint64_t
30bpobj_alloc(objset_t *os, int blocksize, dmu_tx_t *tx)
31{
32 int size;
33
34 if (spa_version(dmu_objset_spa(os)) < SPA_VERSION_BPOBJ_ACCOUNT)
35 size = BPOBJ_SIZE_V0;

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

435
436/* ARGSUSED */
437static int
438space_range_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
439{
440 struct space_range_arg *sra = arg;
441
442 if (bp->blk_birth > sra->mintxg && bp->blk_birth <= sra->maxtxg) {
30
31uint64_t
32bpobj_alloc(objset_t *os, int blocksize, dmu_tx_t *tx)
33{
34 int size;
35
36 if (spa_version(dmu_objset_spa(os)) < SPA_VERSION_BPOBJ_ACCOUNT)
37 size = BPOBJ_SIZE_V0;

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

437
438/* ARGSUSED */
439static int
440space_range_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
441{
442 struct space_range_arg *sra = arg;
443
444 if (bp->blk_birth > sra->mintxg && bp->blk_birth <= sra->maxtxg) {
443 sra->used += bp_get_dsize_sync(sra->spa, bp);
445 if (dsl_pool_sync_context(spa_get_dsl(sra->spa)))
446 sra->used += bp_get_dsize_sync(sra->spa, bp);
447 else
448 sra->used += bp_get_dsize(sra->spa, bp);
444 sra->comp += BP_GET_PSIZE(bp);
445 sra->uncomp += BP_GET_UCSIZE(bp);
446 }
447 return (0);
448}
449
450int
451bpobj_space(bpobj_t *bpo, uint64_t *usedp, uint64_t *compp, uint64_t *uncompp)

--- 44 unchanged lines hidden ---
449 sra->comp += BP_GET_PSIZE(bp);
450 sra->uncomp += BP_GET_UCSIZE(bp);
451 }
452 return (0);
453}
454
455int
456bpobj_space(bpobj_t *bpo, uint64_t *usedp, uint64_t *compp, uint64_t *uncompp)

--- 44 unchanged lines hidden ---