X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=include%2Fsys%2Fdmu.h;h=17857255e311debe89fc869e7128b33e722405d7;hb=55d85d5a8c45c4559a4a0e675c37b0c3afb19c2f;hp=ce316973130ff19a0cc3d6a52936d77b15875cca;hpb=9ae529ec5dbdc828ff8326beae58062971d74b2e;p=zfs.git diff --git a/include/sys/dmu.h b/include/sys/dmu.h index ce31697..1785725 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -309,6 +309,7 @@ typedef void dmu_buf_evict_func_t(struct dmu_buf *db, void *user_ptr); #define DMU_POOL_SCAN "scan" #define DMU_POOL_FREE_BPOBJ "free_bpobj" #define DMU_POOL_BPTREE_OBJ "bptree_obj" +#define DMU_POOL_EMPTY_BPOBJ "empty_bpobj" /* * Allocate an object from this objset. The range of object numbers @@ -409,7 +410,7 @@ void dmu_write_policy(objset_t *os, struct dnode *dn, int level, int wp, * read db_data, dmu_buf_will_dirty() before modifying it, and the * object must be held in an assigned transaction before calling * dmu_buf_will_dirty. You may use dmu_buf_set_user() on the bonus - * buffer as well. You must release your hold with dmu_buf_rele(). + * buffer as well. You must release what you hold with dmu_buf_rele(). */ int dmu_bonus_hold(objset_t *os, uint64_t object, void *tag, dmu_buf_t **); int dmu_bonus_max(void); @@ -431,8 +432,8 @@ int dmu_spill_hold_existing(dmu_buf_t *bonus, void *tag, dmu_buf_t **dbp); * Obtain the DMU buffer from the specified object which contains the * specified offset. dmu_buf_hold() puts a "hold" on the buffer, so * that it will remain in memory. You must release the hold with - * dmu_buf_rele(). You musn't access the dmu_buf_t after releasing your - * hold. You must have a hold on any dmu_buf_t* you pass to the DMU. + * dmu_buf_rele(). You must not access the dmu_buf_t after releasing + * what you hold. You must have a hold on any dmu_buf_t* you pass to the DMU. * * You must call dmu_buf_read, dmu_buf_will_dirty, or dmu_buf_will_fill * on the returned buffer before reading or writing the buffer's @@ -640,7 +641,7 @@ typedef struct dmu_object_info { uint64_t doi_fill_count; /* number of non-empty blocks */ } dmu_object_info_t; -typedef void arc_byteswap_func_t(void *buf, size_t size); +typedef void (*const arc_byteswap_func_t)(void *buf, size_t size); typedef struct dmu_object_type_info { dmu_object_byteswap_t ot_byteswap; @@ -648,8 +649,8 @@ typedef struct dmu_object_type_info { char *ot_name; } dmu_object_type_info_t; -typedef struct dmu_object_byteswap_info { - arc_byteswap_func_t *ob_func; +typedef const struct dmu_object_byteswap_info { + arc_byteswap_func_t ob_func; char *ob_name; } dmu_object_byteswap_info_t; @@ -730,7 +731,7 @@ extern uint64_t dmu_objset_syncprop(objset_t *os); extern uint64_t dmu_objset_logbias(objset_t *os); extern int dmu_snapshot_list_next(objset_t *os, int namelen, char *name, uint64_t *id, uint64_t *offp, boolean_t *case_conflict); -extern int dmu_snapshot_id(objset_t *os, const char *snapname, uint64_t *idp); +extern int dmu_snapshot_lookup(objset_t *os, const char *name, uint64_t *val); extern int dmu_snapshot_realname(objset_t *os, char *name, char *real, int maxlen, boolean_t *conflict); extern int dmu_dir_list_next(objset_t *os, int namelen, char *name,