zap.c (219089) | zap.c (236884) |
---|---|
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) 2012 by Delphix. All rights reserved. |
|
23 */ 24 25/* 26 * This file contains the top half of the zfs directory structure 27 * implementation. The bottom half is in zap_leaf.c. 28 * 29 * The zdir is an extendable hash data structure. There is a table of 30 * pointers to buckets (zap_t->zd_data->zd_leafs). The buckets are --- 910 unchanged lines hidden (view full) --- 941 bs = FZAP_BLOCK_SHIFT(zap); 942 dmu_prefetch(zap->zap_objset, zap->zap_object, blk << bs, 1 << bs); 943} 944 945/* 946 * Helper functions for consumers. 947 */ 948 | 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 --- 910 unchanged lines hidden (view full) --- 942 bs = FZAP_BLOCK_SHIFT(zap); 943 dmu_prefetch(zap->zap_objset, zap->zap_object, blk << bs, 1 << bs); 944} 945 946/* 947 * Helper functions for consumers. 948 */ 949 |
950uint64_t 951zap_create_link(objset_t *os, dmu_object_type_t ot, uint64_t parent_obj, 952 const char *name, dmu_tx_t *tx) 953{ 954 uint64_t new_obj; 955 956 VERIFY((new_obj = zap_create(os, ot, DMU_OT_NONE, 0, tx)) > 0); 957 VERIFY(zap_add(os, parent_obj, name, sizeof (uint64_t), 1, &new_obj, 958 tx) == 0); 959 960 return (new_obj); 961} 962 |
|
949int 950zap_value_search(objset_t *os, uint64_t zapobj, uint64_t value, uint64_t mask, 951 char *name) 952{ 953 zap_cursor_t zc; 954 zap_attribute_t *za; 955 int err; 956 --- 398 unchanged lines hidden --- | 963int 964zap_value_search(objset_t *os, uint64_t zapobj, uint64_t value, uint64_t mask, 965 char *name) 966{ 967 zap_cursor_t zc; 968 zap_attribute_t *za; 969 int err; 970 --- 398 unchanged lines hidden --- |