usr/src/uts/common/fs/zfs/sys/zap_impl.h
author ahrens
Thu, 10 Nov 2005 18:43:50 -0800
changeset 885 d925b21dba78
parent 789 b348f31ed315
child 1491 bdcb30e07e7d
permissions -rw-r--r--
6347493 tar of 25K empty directory entries in ZFS takes 30+ seconds ... 6348409 'zfs rename' process hangs after assigning a very long name ... 6348464 a few DMU object type macros are misnamed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     1
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     2
 * CDDL HEADER START
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     3
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     5
 * Common Development and Distribution License, Version 1.0 only
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     6
 * (the "License").  You may not use this file except in compliance
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     7
 * with the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     8
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     9
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    10
 * or http://www.opensolaris.org/os/licensing.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    11
 * See the License for the specific language governing permissions
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    12
 * and limitations under the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    13
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    14
 * When distributing Covered Code, include this CDDL HEADER in each
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    15
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    16
 * If applicable, add the following below this CDDL HEADER, with the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    17
 * fields enclosed by brackets "[]" replaced with your own identifying
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    18
 * information: Portions Copyright [yyyy] [name of copyright owner]
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    19
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    20
 * CDDL HEADER END
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    21
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    22
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    23
 * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    24
 * Use is subject to license terms.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    25
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    26
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    27
#ifndef	_SYS_ZAP_IMPL_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    28
#define	_SYS_ZAP_IMPL_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    29
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    30
#pragma ident	"%Z%%M%	%I%	%E% SMI"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    31
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    32
#include <sys/zap.h>
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    33
#include <sys/zfs_context.h>
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    34
#include <sys/avl.h>
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    35
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    36
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    37
extern "C" {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    38
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    39
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    40
#define	ZAP_MAGIC 0x2F52AB2AB
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    41
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    42
#define	ZAP_BLOCK_SHIFT		17
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    43
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    44
#define	ZAP_MAXCD		(uint32_t)(-1)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    45
#define	ZAP_HASHBITS		28
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    46
#define	MZAP_ENT_LEN		64
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    47
#define	MZAP_NAME_LEN		(MZAP_ENT_LEN - 8 - 4 - 2)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    48
#define	MZAP_MAX_BLKSHIFT	ZAP_BLOCK_SHIFT
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    49
#define	MZAP_MAX_BLKSZ		(1 << MZAP_MAX_BLKSHIFT)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    50
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    51
typedef struct mzap_ent_phys {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    52
	uint64_t mze_value;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    53
	uint32_t mze_cd;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    54
	uint16_t mze_pad;	/* in case we want to chain them someday */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    55
	char mze_name[MZAP_NAME_LEN];
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    56
} mzap_ent_phys_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    57
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    58
typedef struct mzap_phys {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    59
	uint64_t mz_block_type;	/* ZBT_MICRO */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    60
	uint64_t mz_salt;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    61
	uint64_t mz_pad[6];
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    62
	mzap_ent_phys_t mz_chunk[1];
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    63
	/* actually variable size depending on block size */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    64
} mzap_phys_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    65
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    66
typedef struct mzap_ent {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    67
	avl_node_t mze_node;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    68
	int mze_chunkid;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    69
	uint64_t mze_hash;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    70
	mzap_ent_phys_t mze_phys;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    71
} mzap_ent_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    72
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    73
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    74
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    75
 * The (fat) zap is stored in one object. It is an array of
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    76
 * 1<<ZAP_BLOCK_SHIFT byte blocks. The layout looks like one of:
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    77
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    78
 * ptrtbl fits in first block:
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    79
 * 	[zap_phys_t zap_ptrtbl_shift < 6] [zap_leaf_t] ...
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    80
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    81
 * ptrtbl too big for first block:
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    82
 * 	[zap_phys_t zap_ptrtbl_shift >= 6] [zap_leaf_t] [ptrtbl] ...
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    83
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    84
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    85
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    86
struct dmu_buf;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    87
struct zap_leaf;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    88
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    89
#define	ZBT_LEAF		((1ULL << 63) + 0)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    90
#define	ZBT_HEADER		((1ULL << 63) + 1)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    91
#define	ZBT_MICRO		((1ULL << 63) + 3)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    92
/* any other values are ptrtbl blocks */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    93
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    94
/* 1/2 the block size */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    95
#define	ZAP_PTRTBL_MIN_SHIFT (ZAP_BLOCK_SHIFT - 3 - 1)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    96
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    97
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    98
 * TAKE NOTE:
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    99
 * If zap_phys_t is modified, zap_byteswap() must be modified.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   100
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   101
typedef struct zap_phys {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   102
	uint64_t zap_block_type;	/* ZBT_HEADER */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   103
	uint64_t zap_magic;		/* ZAP_MAGIC */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   104
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   105
	struct zap_table_phys {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   106
		uint64_t zt_blk;	/* starting block number */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   107
		uint64_t zt_numblks;	/* number of blocks */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   108
		uint64_t zt_shift;	/* bits to index it */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   109
		uint64_t zt_nextblk;	/* next (larger) copy start block */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   110
		uint64_t zt_blks_copied; /* number source blocks copied */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   111
	} zap_ptrtbl;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   112
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   113
	uint64_t zap_freeblk;		/* the next free block */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   114
	uint64_t zap_num_leafs;		/* number of leafs */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   115
	uint64_t zap_num_entries;	/* number of entries */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   116
	uint64_t zap_salt;		/* salt to stir into hash function */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   117
	uint64_t zap_pad[8181];
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   118
	uint64_t zap_leafs[1 << ZAP_PTRTBL_MIN_SHIFT];
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   119
} zap_phys_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   120
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   121
typedef struct zap_table_phys zap_table_phys_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   122
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   123
typedef struct zap {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   124
	objset_t *zap_objset;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   125
	uint64_t zap_object;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   126
	struct dmu_buf *zap_dbuf;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   127
	krwlock_t zap_rwlock;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   128
	int zap_ismicro;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   129
	uint64_t zap_salt;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   130
	union {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   131
		struct {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   132
			zap_phys_t *zap_phys;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   133
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   134
			/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   135
			 * zap_num_entries_mtx protects
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   136
			 * zap_num_entries
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   137
			 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   138
			kmutex_t zap_num_entries_mtx;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   139
		} zap_fat;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   140
		struct {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   141
			mzap_phys_t *zap_phys;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   142
			int16_t zap_num_entries;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   143
			int16_t zap_num_chunks;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   144
			int16_t zap_alloc_next;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   145
			avl_tree_t zap_avl;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   146
		} zap_micro;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   147
	} zap_u;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   148
} zap_t;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   149
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   150
#define	zap_f	zap_u.zap_fat
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   151
#define	zap_m	zap_u.zap_micro
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   152
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   153
uint64_t zap_hash(zap_t *zap, const char *name);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   154
int zap_lockdir(objset_t *os, uint64_t obj, dmu_tx_t *tx,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   155
    krw_t lti, int fatreader, zap_t **zapp);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   156
void zap_unlockdir(zap_t *zap);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   157
void zap_pageout(dmu_buf_t *db, void *vmzap);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   158
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   159
void zap_print(zap_t *);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   160
struct zap_leaf *zap_create_leaf(zap_t *zd, dmu_tx_t *tx);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   161
void zap_destroy_leaf(zap_t *zap, struct zap_leaf *l, dmu_tx_t *tx);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   162
uint64_t zap_allocate_blocks(zap_t *zap, int nblocks, dmu_tx_t *tx);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   163
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   164
#define	ZAP_HASH_IDX(hash, n) (((n) == 0) ? 0 : ((hash) >> (64 - (n))))
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   165
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   166
void fzap_byteswap(void *buf, size_t size);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   167
int fzap_count(zap_t *zap, uint64_t *count);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   168
int fzap_lookup(zap_t *zap, const char *name,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   169
    uint64_t integer_size, uint64_t num_integers, void *buf);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   170
int fzap_add(zap_t *zap, const char *name,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   171
    uint64_t integer_size, uint64_t num_integers,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   172
    const void *val, dmu_tx_t *tx);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   173
int fzap_update(zap_t *zap, const char *name,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   174
    int integer_size, uint64_t num_integers, const void *val, dmu_tx_t *tx);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   175
int fzap_length(zap_t *zap, const char *name,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   176
    uint64_t *integer_size, uint64_t *num_integers);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   177
int fzap_remove(zap_t *zap, const char *name, dmu_tx_t *tx);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   178
int fzap_cursor_retrieve(zap_t *zap, zap_cursor_t *zc, zap_attribute_t *za);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   179
void fzap_get_stats(zap_t *zap, zap_stats_t *zs);
885
d925b21dba78 6347493 tar of 25K empty directory entries in ZFS takes 30+ seconds ...
ahrens
parents: 789
diff changeset
   180
void zap_put_leaf(struct zap_leaf *l);
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   181
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   182
int fzap_add_cd(zap_t *zap, const char *name,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   183
    uint64_t integer_size, uint64_t num_integers,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   184
    const void *val, uint32_t cd, dmu_tx_t *tx, struct zap_leaf **lp);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   185
void fzap_upgrade(zap_t *zap, dmu_tx_t *tx);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   186
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   187
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   188
}
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   189
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   190
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   191
#endif /* _SYS_ZAP_IMPL_H */