Deleted Added
full compact
dmu_object.c (286705) dmu_object.c (296610)
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) 2013, 2014 by Delphix. All rights reserved.
23 * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
24 * Copyright 2014 HybridCluster. All rights reserved.
25 */
26
27#include <sys/dmu.h>
28#include <sys/dmu_objset.h>
29#include <sys/dmu_tx.h>
30#include <sys/dnode.h>
31#include <sys/zap.h>

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

45 for (;;) {
46 object = os->os_obj_next;
47 /*
48 * Each time we polish off an L2 bp worth of dnodes
49 * (2^13 objects), move to another L2 bp that's still
50 * reasonably sparse (at most 1/4 full). Look from the
51 * beginning once, but after that keep looking from here.
52 * If we can't find one, just keep going from here.
24 * Copyright 2014 HybridCluster. All rights reserved.
25 */
26
27#include <sys/dmu.h>
28#include <sys/dmu_objset.h>
29#include <sys/dmu_tx.h>
30#include <sys/dnode.h>
31#include <sys/zap.h>

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

45 for (;;) {
46 object = os->os_obj_next;
47 /*
48 * Each time we polish off an L2 bp worth of dnodes
49 * (2^13 objects), move to another L2 bp that's still
50 * reasonably sparse (at most 1/4 full). Look from the
51 * beginning once, but after that keep looking from here.
52 * If we can't find one, just keep going from here.
53 *
54 * Note that dmu_traverse depends on the behavior that we use
55 * multiple blocks of the dnode object before going back to
56 * reuse objects. Any change to this algorithm should preserve
57 * that property or find another solution to the issues
58 * described in traverse_visitbp.
53 */
54 if (P2PHASE(object, L2_dnode_count) == 0) {
55 uint64_t offset = restarted ? object << DNODE_SHIFT : 0;
56 int error = dnode_next_offset(DMU_META_DNODE(os),
57 DNODE_FIND_HOLE,
58 &offset, 2, DNODES_PER_BLOCK >> 2, 0);
59 restarted = B_TRUE;
60 if (error == 0)

--- 159 unchanged lines hidden ---
59 */
60 if (P2PHASE(object, L2_dnode_count) == 0) {
61 uint64_t offset = restarted ? object << DNODE_SHIFT : 0;
62 int error = dnode_next_offset(DMU_META_DNODE(os),
63 DNODE_FIND_HOLE,
64 &offset, 2, DNODES_PER_BLOCK >> 2, 0);
65 restarted = B_TRUE;
66 if (error == 0)

--- 159 unchanged lines hidden ---