usr/src/uts/common/fs/zfs/sys/zap.h
changeset 13700 2889e2596bd6
parent 12450 c77e20e4e046
child 13782 8f78aae28a63
equal deleted inserted replaced
13699:733714f4dc24 13700:2889e2596bd6
    18  *
    18  *
    19  * CDDL HEADER END
    19  * CDDL HEADER END
    20  */
    20  */
    21 /*
    21 /*
    22  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
    22  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
       
    23  * Copyright (c) 2012 by Delphix. All rights reserved.
    23  */
    24  */
    24 
    25 
    25 #ifndef	_SYS_ZAP_H
    26 #ifndef	_SYS_ZAP_H
    26 #define	_SYS_ZAP_H
    27 #define	_SYS_ZAP_H
    27 
    28 
   130 uint64_t zap_create_norm(objset_t *ds, int normflags, dmu_object_type_t ot,
   131 uint64_t zap_create_norm(objset_t *ds, int normflags, dmu_object_type_t ot,
   131     dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
   132     dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
   132 uint64_t zap_create_flags(objset_t *os, int normflags, zap_flags_t flags,
   133 uint64_t zap_create_flags(objset_t *os, int normflags, zap_flags_t flags,
   133     dmu_object_type_t ot, int leaf_blockshift, int indirect_blockshift,
   134     dmu_object_type_t ot, int leaf_blockshift, int indirect_blockshift,
   134     dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
   135     dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx);
       
   136 uint64_t zap_create_link(objset_t *os, dmu_object_type_t ot,
       
   137     uint64_t parent_obj, const char *name, dmu_tx_t *tx);
   135 
   138 
   136 /*
   139 /*
   137  * Create a new zapobj with no attributes from the given (unallocated)
   140  * Create a new zapobj with no attributes from the given (unallocated)
   138  * object number.
   141  * object number.
   139  */
   142  */
   298 int zap_add_int_key(objset_t *os, uint64_t obj,
   301 int zap_add_int_key(objset_t *os, uint64_t obj,
   299     uint64_t key, uint64_t value, dmu_tx_t *tx);
   302     uint64_t key, uint64_t value, dmu_tx_t *tx);
   300 int zap_lookup_int_key(objset_t *os, uint64_t obj,
   303 int zap_lookup_int_key(objset_t *os, uint64_t obj,
   301     uint64_t key, uint64_t *valuep);
   304     uint64_t key, uint64_t *valuep);
   302 
   305 
   303 /*
       
   304  * They name is a stringified version of key; increment its value by
       
   305  * delta.  Zero values will be zap_remove()-ed.
       
   306  */
       
   307 int zap_increment_int(objset_t *os, uint64_t obj, uint64_t key, int64_t delta,
       
   308     dmu_tx_t *tx);
       
   309 int zap_increment(objset_t *os, uint64_t obj, const char *name, int64_t delta,
   306 int zap_increment(objset_t *os, uint64_t obj, const char *name, int64_t delta,
   310     dmu_tx_t *tx);
   307     dmu_tx_t *tx);
   311 
   308 
   312 struct zap;
   309 struct zap;
   313 struct zap_leaf;
   310 struct zap_leaf;