Deleted Added
full compact
zap.c (256281) zap.c (265740)
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 by Delphix. All rights reserved.
23 * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
24 */
25
26/*
27 * This file contains the top half of the zfs directory structure
28 * implementation. The bottom half is in zap_leaf.c.
29 *
30 * The zdir is an extendable hash data structure. There is a table of
31 * pointers to buckets (zap_t->zd_data->zd_leafs). The buckets are

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

79
80 ASSERT(RW_WRITE_HELD(&zap->zap_rwlock));
81 zap->zap_ismicro = FALSE;
82
83 (void) dmu_buf_update_user(zap->zap_dbuf, zap, zap,
84 &zap->zap_f.zap_phys, zap_evict);
85
86 mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0);
24 */
25
26/*
27 * This file contains the top half of the zfs directory structure
28 * implementation. The bottom half is in zap_leaf.c.
29 *
30 * The zdir is an extendable hash data structure. There is a table of
31 * pointers to buckets (zap_t->zd_data->zd_leafs). The buckets are

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

79
80 ASSERT(RW_WRITE_HELD(&zap->zap_rwlock));
81 zap->zap_ismicro = FALSE;
82
83 (void) dmu_buf_update_user(zap->zap_dbuf, zap, zap,
84 &zap->zap_f.zap_phys, zap_evict);
85
86 mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0);
87 zap->zap_f.zap_block_shift = highbit(zap->zap_dbuf->db_size) - 1;
87 zap->zap_f.zap_block_shift = highbit64(zap->zap_dbuf->db_size) - 1;
88
89 zp = zap->zap_f.zap_phys;
90 /*
91 * explicitly zero it since it might be coming from an
92 * initialized microzap
93 */
94 bzero(zap->zap_dbuf->db_data, zap->zap_dbuf->db_size);
95 zp->zap_block_type = ZBT_HEADER;

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

453 zap_leaf_t *l, *winner;
454
455 ASSERT(blkid != 0);
456
457 l = kmem_alloc(sizeof (zap_leaf_t), KM_SLEEP);
458 rw_init(&l->l_rwlock, 0, 0, 0);
459 rw_enter(&l->l_rwlock, RW_WRITER);
460 l->l_blkid = blkid;
88
89 zp = zap->zap_f.zap_phys;
90 /*
91 * explicitly zero it since it might be coming from an
92 * initialized microzap
93 */
94 bzero(zap->zap_dbuf->db_data, zap->zap_dbuf->db_size);
95 zp->zap_block_type = ZBT_HEADER;

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

453 zap_leaf_t *l, *winner;
454
455 ASSERT(blkid != 0);
456
457 l = kmem_alloc(sizeof (zap_leaf_t), KM_SLEEP);
458 rw_init(&l->l_rwlock, 0, 0, 0);
459 rw_enter(&l->l_rwlock, RW_WRITER);
460 l->l_blkid = blkid;
461 l->l_bs = highbit(db->db_size)-1;
461 l->l_bs = highbit64(db->db_size) - 1;
462 l->l_dbuf = db;
463 l->l_phys = NULL;
464
465 winner = dmu_buf_set_user(db, l, &l->l_phys, zap_leaf_pageout);
466
467 rw_exit(&l->l_rwlock);
468 if (winner != NULL) {
469 /* someone else set it first */

--- 919 unchanged lines hidden ---
462 l->l_dbuf = db;
463 l->l_phys = NULL;
464
465 winner = dmu_buf_set_user(db, l, &l->l_phys, zap_leaf_pageout);
466
467 rw_exit(&l->l_rwlock);
468 if (winner != NULL) {
469 /* someone else set it first */

--- 919 unchanged lines hidden ---