mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Enable -Wwrite-strings
Also, fix leak from ztest_global_vars_to_zdb_args() Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13348
This commit is contained in:
+3
-3
@@ -264,12 +264,12 @@ int arc_untransform(arc_buf_t *buf, spa_t *spa, const zbookmark_phys_t *zb,
|
||||
void arc_convert_to_raw(arc_buf_t *buf, uint64_t dsobj, boolean_t byteorder,
|
||||
dmu_object_type_t ot, const uint8_t *salt, const uint8_t *iv,
|
||||
const uint8_t *mac);
|
||||
arc_buf_t *arc_alloc_buf(spa_t *spa, void *tag, arc_buf_contents_t type,
|
||||
arc_buf_t *arc_alloc_buf(spa_t *spa, const void *tag, arc_buf_contents_t type,
|
||||
int32_t size);
|
||||
arc_buf_t *arc_alloc_compressed_buf(spa_t *spa, void *tag,
|
||||
arc_buf_t *arc_alloc_compressed_buf(spa_t *spa, const void *tag,
|
||||
uint64_t psize, uint64_t lsize, enum zio_compress compression_type,
|
||||
uint8_t complevel);
|
||||
arc_buf_t *arc_alloc_raw_buf(spa_t *spa, void *tag, uint64_t dsobj,
|
||||
arc_buf_t *arc_alloc_raw_buf(spa_t *spa, const void *tag, uint64_t dsobj,
|
||||
boolean_t byteorder, const uint8_t *salt, const uint8_t *iv,
|
||||
const uint8_t *mac, dmu_object_type_t ot, uint64_t psize, uint64_t lsize,
|
||||
enum zio_compress compression_type, uint8_t complevel);
|
||||
|
||||
+12
-9
@@ -339,12 +339,12 @@ int dbuf_spill_set_blksz(dmu_buf_t *db, uint64_t blksz, dmu_tx_t *tx);
|
||||
|
||||
void dbuf_rm_spill(struct dnode *dn, dmu_tx_t *tx);
|
||||
|
||||
dmu_buf_impl_t *dbuf_hold(struct dnode *dn, uint64_t blkid, void *tag);
|
||||
dmu_buf_impl_t *dbuf_hold(struct dnode *dn, uint64_t blkid, const void *tag);
|
||||
dmu_buf_impl_t *dbuf_hold_level(struct dnode *dn, int level, uint64_t blkid,
|
||||
void *tag);
|
||||
const void *tag);
|
||||
int dbuf_hold_impl(struct dnode *dn, uint8_t level, uint64_t blkid,
|
||||
boolean_t fail_sparse, boolean_t fail_uncached,
|
||||
void *tag, dmu_buf_impl_t **dbp);
|
||||
const void *tag, dmu_buf_impl_t **dbp);
|
||||
|
||||
int dbuf_prefetch_impl(struct dnode *dn, int64_t level, uint64_t blkid,
|
||||
zio_priority_t prio, arc_flags_t aflags, dbuf_prefetch_fn cb,
|
||||
@@ -352,13 +352,14 @@ int dbuf_prefetch_impl(struct dnode *dn, int64_t level, uint64_t blkid,
|
||||
int dbuf_prefetch(struct dnode *dn, int64_t level, uint64_t blkid,
|
||||
zio_priority_t prio, arc_flags_t aflags);
|
||||
|
||||
void dbuf_add_ref(dmu_buf_impl_t *db, void *tag);
|
||||
void dbuf_add_ref(dmu_buf_impl_t *db, const void *tag);
|
||||
boolean_t dbuf_try_add_ref(dmu_buf_t *db, objset_t *os, uint64_t obj,
|
||||
uint64_t blkid, void *tag);
|
||||
uint64_t blkid, const void *tag);
|
||||
uint64_t dbuf_refcount(dmu_buf_impl_t *db);
|
||||
|
||||
void dbuf_rele(dmu_buf_impl_t *db, void *tag);
|
||||
void dbuf_rele_and_unlock(dmu_buf_impl_t *db, void *tag, boolean_t evicting);
|
||||
void dbuf_rele(dmu_buf_impl_t *db, const void *tag);
|
||||
void dbuf_rele_and_unlock(dmu_buf_impl_t *db, const void *tag,
|
||||
boolean_t evicting);
|
||||
|
||||
dmu_buf_impl_t *dbuf_find(struct objset *os, uint64_t object, uint8_t level,
|
||||
uint64_t blkid);
|
||||
@@ -385,8 +386,10 @@ void dbuf_destroy(dmu_buf_impl_t *db);
|
||||
void dbuf_unoverride(dbuf_dirty_record_t *dr);
|
||||
void dbuf_sync_list(list_t *list, int level, dmu_tx_t *tx);
|
||||
void dbuf_release_bp(dmu_buf_impl_t *db);
|
||||
db_lock_type_t dmu_buf_lock_parent(dmu_buf_impl_t *db, krw_t rw, void *tag);
|
||||
void dmu_buf_unlock_parent(dmu_buf_impl_t *db, db_lock_type_t type, void *tag);
|
||||
db_lock_type_t dmu_buf_lock_parent(dmu_buf_impl_t *db, krw_t rw,
|
||||
const void *tag);
|
||||
void dmu_buf_unlock_parent(dmu_buf_impl_t *db, db_lock_type_t type,
|
||||
const void *tag);
|
||||
|
||||
void dbuf_free_range(struct dnode *dn, uint64_t start, uint64_t end,
|
||||
struct dmu_tx *);
|
||||
|
||||
+23
-20
@@ -319,11 +319,12 @@ void zfs_znode_byteswap(void *buf, size_t size);
|
||||
typedef void dmu_objset_create_sync_func_t(objset_t *os, void *arg,
|
||||
cred_t *cr, dmu_tx_t *tx);
|
||||
|
||||
int dmu_objset_hold(const char *name, void *tag, objset_t **osp);
|
||||
int dmu_objset_hold(const char *name, const void *tag, objset_t **osp);
|
||||
int dmu_objset_own(const char *name, dmu_objset_type_t type,
|
||||
boolean_t readonly, boolean_t key_required, void *tag, objset_t **osp);
|
||||
void dmu_objset_rele(objset_t *os, void *tag);
|
||||
void dmu_objset_disown(objset_t *os, boolean_t key_required, void *tag);
|
||||
boolean_t readonly, boolean_t key_required, const void *tag,
|
||||
objset_t **osp);
|
||||
void dmu_objset_rele(objset_t *os, const void *tag);
|
||||
void dmu_objset_disown(objset_t *os, boolean_t key_required, const void *tag);
|
||||
int dmu_objset_open_ds(struct dsl_dataset *ds, objset_t **osp);
|
||||
|
||||
void dmu_objset_evict_dbufs(objset_t *os);
|
||||
@@ -407,7 +408,7 @@ uint64_t dmu_object_alloc_dnsize(objset_t *os, dmu_object_type_t ot,
|
||||
int dnodesize, dmu_tx_t *tx);
|
||||
uint64_t dmu_object_alloc_hold(objset_t *os, dmu_object_type_t ot,
|
||||
int blocksize, int indirect_blockshift, dmu_object_type_t bonustype,
|
||||
int bonuslen, int dnodesize, dnode_t **allocated_dnode, void *tag,
|
||||
int bonuslen, int dnodesize, dnode_t **allocated_dnode, const void *tag,
|
||||
dmu_tx_t *tx);
|
||||
int dmu_object_claim(objset_t *os, uint64_t object, dmu_object_type_t ot,
|
||||
int blocksize, dmu_object_type_t bonus_type, int bonus_len, dmu_tx_t *tx);
|
||||
@@ -524,8 +525,9 @@ void dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp,
|
||||
*
|
||||
* Returns ENOENT, EIO, or 0.
|
||||
*/
|
||||
int dmu_bonus_hold(objset_t *os, uint64_t object, void *tag, dmu_buf_t **dbp);
|
||||
int dmu_bonus_hold_by_dnode(dnode_t *dn, void *tag, dmu_buf_t **dbp,
|
||||
int dmu_bonus_hold(objset_t *os, uint64_t object, const void *tag,
|
||||
dmu_buf_t **dbp);
|
||||
int dmu_bonus_hold_by_dnode(dnode_t *dn, const void *tag, dmu_buf_t **dbp,
|
||||
uint32_t flags);
|
||||
int dmu_bonus_max(void);
|
||||
int dmu_set_bonus(dmu_buf_t *, int, dmu_tx_t *);
|
||||
@@ -537,11 +539,11 @@ int dmu_rm_spill(objset_t *, uint64_t, dmu_tx_t *);
|
||||
* Special spill buffer support used by "SA" framework
|
||||
*/
|
||||
|
||||
int dmu_spill_hold_by_bonus(dmu_buf_t *bonus, uint32_t flags, void *tag,
|
||||
int dmu_spill_hold_by_bonus(dmu_buf_t *bonus, uint32_t flags, const void *tag,
|
||||
dmu_buf_t **dbp);
|
||||
int dmu_spill_hold_by_dnode(dnode_t *dn, uint32_t flags,
|
||||
void *tag, dmu_buf_t **dbp);
|
||||
int dmu_spill_hold_existing(dmu_buf_t *bonus, void *tag, dmu_buf_t **dbp);
|
||||
const void *tag, dmu_buf_t **dbp);
|
||||
int dmu_spill_hold_existing(dmu_buf_t *bonus, const void *tag, dmu_buf_t **dbp);
|
||||
|
||||
/*
|
||||
* Obtain the DMU buffer from the specified object which contains the
|
||||
@@ -558,13 +560,14 @@ int dmu_spill_hold_existing(dmu_buf_t *bonus, void *tag, dmu_buf_t **dbp);
|
||||
* The object number must be a valid, allocated object number.
|
||||
*/
|
||||
int dmu_buf_hold(objset_t *os, uint64_t object, uint64_t offset,
|
||||
void *tag, dmu_buf_t **, int flags);
|
||||
const void *tag, dmu_buf_t **, int flags);
|
||||
int dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
|
||||
uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp);
|
||||
uint64_t length, int read, const void *tag, int *numbufsp,
|
||||
dmu_buf_t ***dbpp);
|
||||
int dmu_buf_hold_by_dnode(dnode_t *dn, uint64_t offset,
|
||||
void *tag, dmu_buf_t **dbp, int flags);
|
||||
const void *tag, dmu_buf_t **dbp, int flags);
|
||||
int dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
|
||||
uint64_t length, boolean_t read, void *tag, int *numbufsp,
|
||||
uint64_t length, boolean_t read, const void *tag, int *numbufsp,
|
||||
dmu_buf_t ***dbpp, uint32_t flags);
|
||||
/*
|
||||
* Add a reference to a dmu buffer that has already been held via
|
||||
@@ -580,9 +583,9 @@ void dmu_buf_add_ref(dmu_buf_t *db, void* tag);
|
||||
* one hold by a user other than the syncer.
|
||||
*/
|
||||
boolean_t dmu_buf_try_add_ref(dmu_buf_t *, objset_t *os, uint64_t object,
|
||||
uint64_t blkid, void *tag);
|
||||
uint64_t blkid, const void *tag);
|
||||
|
||||
void dmu_buf_rele(dmu_buf_t *db, void *tag);
|
||||
void dmu_buf_rele(dmu_buf_t *db, const void *tag);
|
||||
uint64_t dmu_buf_refcount(dmu_buf_t *db);
|
||||
uint64_t dmu_buf_user_refcount(dmu_buf_t *db);
|
||||
|
||||
@@ -597,9 +600,9 @@ uint64_t dmu_buf_user_refcount(dmu_buf_t *db);
|
||||
* individually with dmu_buf_rele.
|
||||
*/
|
||||
int dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset,
|
||||
uint64_t length, boolean_t read, void *tag,
|
||||
uint64_t length, boolean_t read, const void *tag,
|
||||
int *numbufsp, dmu_buf_t ***dbpp);
|
||||
void dmu_buf_rele_array(dmu_buf_t **, int numbufs, void *tag);
|
||||
void dmu_buf_rele_array(dmu_buf_t **, int numbufs, const void *tag);
|
||||
|
||||
typedef void dmu_buf_evict_func_t(void *user_ptr);
|
||||
|
||||
@@ -895,12 +898,12 @@ typedef struct dmu_object_type_info {
|
||||
boolean_t ot_metadata;
|
||||
boolean_t ot_dbuf_metadata_cache;
|
||||
boolean_t ot_encrypt;
|
||||
char *ot_name;
|
||||
const char *ot_name;
|
||||
} dmu_object_type_info_t;
|
||||
|
||||
typedef const struct dmu_object_byteswap_info {
|
||||
arc_byteswap_func_t ob_func;
|
||||
char *ob_name;
|
||||
const char *ob_name;
|
||||
} dmu_object_byteswap_info_t;
|
||||
|
||||
extern const dmu_object_type_info_t dmu_ot[DMU_OT_NUMTYPES];
|
||||
|
||||
@@ -248,7 +248,7 @@ typedef struct dmu_sendstatus {
|
||||
void dmu_object_zapify(objset_t *, uint64_t, dmu_object_type_t, dmu_tx_t *);
|
||||
void dmu_object_free_zapified(objset_t *, uint64_t, dmu_tx_t *);
|
||||
int dmu_buf_hold_noread(objset_t *, uint64_t, uint64_t,
|
||||
void *, dmu_buf_t **);
|
||||
const void *, dmu_buf_t **);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -201,19 +201,19 @@ struct objset {
|
||||
#define DMU_PROJECTUSED_DNODE(os) ((os)->os_projectused_dnode.dnh_dnode)
|
||||
|
||||
/* called from zpl */
|
||||
int dmu_objset_hold(const char *name, void *tag, objset_t **osp);
|
||||
int dmu_objset_hold_flags(const char *name, boolean_t decrypt, void *tag,
|
||||
int dmu_objset_hold(const char *name, const void *tag, objset_t **osp);
|
||||
int dmu_objset_hold_flags(const char *name, boolean_t decrypt, const void *tag,
|
||||
objset_t **osp);
|
||||
int dmu_objset_own(const char *name, dmu_objset_type_t type,
|
||||
boolean_t readonly, boolean_t decrypt, void *tag, objset_t **osp);
|
||||
boolean_t readonly, boolean_t decrypt, const void *tag, objset_t **osp);
|
||||
int dmu_objset_own_obj(struct dsl_pool *dp, uint64_t obj,
|
||||
dmu_objset_type_t type, boolean_t readonly, boolean_t decrypt,
|
||||
void *tag, objset_t **osp);
|
||||
const void *tag, objset_t **osp);
|
||||
void dmu_objset_refresh_ownership(struct dsl_dataset *ds,
|
||||
struct dsl_dataset **newds, boolean_t decrypt, void *tag);
|
||||
void dmu_objset_rele(objset_t *os, void *tag);
|
||||
void dmu_objset_rele_flags(objset_t *os, boolean_t decrypt, void *tag);
|
||||
void dmu_objset_disown(objset_t *os, boolean_t decrypt, void *tag);
|
||||
struct dsl_dataset **newds, boolean_t decrypt, const void *tag);
|
||||
void dmu_objset_rele(objset_t *os, const void *tag);
|
||||
void dmu_objset_rele_flags(objset_t *os, boolean_t decrypt, const void *tag);
|
||||
void dmu_objset_disown(objset_t *os, boolean_t decrypt, const void *tag);
|
||||
int dmu_objset_from_ds(struct dsl_dataset *ds, objset_t **osp);
|
||||
|
||||
void dmu_objset_stats(objset_t *os, nvlist_t *nv);
|
||||
|
||||
+7
-7
@@ -334,7 +334,7 @@ struct dnode {
|
||||
kcondvar_t dn_notxholds;
|
||||
kcondvar_t dn_nodnholds;
|
||||
enum dnode_dirtycontext dn_dirtyctx;
|
||||
void *dn_dirtyctx_firstset; /* dbg: contents meaningless */
|
||||
const void *dn_dirtyctx_firstset; /* dbg: contents meaningless */
|
||||
|
||||
/* protected by own devices */
|
||||
zfs_refcount_t dn_tx_holds;
|
||||
@@ -418,16 +418,16 @@ void dnode_setbonus_type(dnode_t *dn, dmu_object_type_t, dmu_tx_t *tx);
|
||||
void dnode_rm_spill(dnode_t *dn, dmu_tx_t *tx);
|
||||
|
||||
int dnode_hold(struct objset *dd, uint64_t object,
|
||||
void *ref, dnode_t **dnp);
|
||||
const void *ref, dnode_t **dnp);
|
||||
int dnode_hold_impl(struct objset *dd, uint64_t object, int flag, int dn_slots,
|
||||
void *ref, dnode_t **dnp);
|
||||
boolean_t dnode_add_ref(dnode_t *dn, void *ref);
|
||||
void dnode_rele(dnode_t *dn, void *ref);
|
||||
void dnode_rele_and_unlock(dnode_t *dn, void *tag, boolean_t evicting);
|
||||
const void *ref, dnode_t **dnp);
|
||||
boolean_t dnode_add_ref(dnode_t *dn, const void *ref);
|
||||
void dnode_rele(dnode_t *dn, const void *ref);
|
||||
void dnode_rele_and_unlock(dnode_t *dn, const void *tag, boolean_t evicting);
|
||||
int dnode_try_claim(objset_t *os, uint64_t object, int slots);
|
||||
boolean_t dnode_is_dirty(dnode_t *dn);
|
||||
void dnode_setdirty(dnode_t *dn, dmu_tx_t *tx);
|
||||
void dnode_set_dirtyctx(dnode_t *dn, dmu_tx_t *tx, void *tag);
|
||||
void dnode_set_dirtyctx(dnode_t *dn, dmu_tx_t *tx, const void *tag);
|
||||
void dnode_sync(dnode_t *dn, dmu_tx_t *tx);
|
||||
void dnode_allocate(dnode_t *dn, dmu_object_type_t ot, int blocksize, int ibs,
|
||||
dmu_object_type_t bonustype, int bonuslen, int dn_slots, dmu_tx_t *tx);
|
||||
|
||||
+16
-14
@@ -220,7 +220,7 @@ typedef struct dsl_dataset {
|
||||
kmutex_t ds_lock;
|
||||
objset_t *ds_objset;
|
||||
uint64_t ds_userrefs;
|
||||
void *ds_owner;
|
||||
const void *ds_owner;
|
||||
|
||||
/*
|
||||
* Long holds prevent the ds from being destroyed; they allow the
|
||||
@@ -319,32 +319,34 @@ typedef enum ds_hold_flags {
|
||||
DS_HOLD_FLAG_DECRYPT = 1 << 0 /* needs access to encrypted data */
|
||||
} ds_hold_flags_t;
|
||||
|
||||
int dsl_dataset_hold(struct dsl_pool *dp, const char *name, void *tag,
|
||||
int dsl_dataset_hold(struct dsl_pool *dp, const char *name, const void *tag,
|
||||
dsl_dataset_t **dsp);
|
||||
int dsl_dataset_hold_flags(struct dsl_pool *dp, const char *name,
|
||||
ds_hold_flags_t flags, void *tag, dsl_dataset_t **dsp);
|
||||
ds_hold_flags_t flags, const void *tag, dsl_dataset_t **dsp);
|
||||
boolean_t dsl_dataset_try_add_ref(struct dsl_pool *dp, dsl_dataset_t *ds,
|
||||
void *tag);
|
||||
const void *tag);
|
||||
int dsl_dataset_create_key_mapping(dsl_dataset_t *ds);
|
||||
int dsl_dataset_hold_obj_flags(struct dsl_pool *dp, uint64_t dsobj,
|
||||
ds_hold_flags_t flags, void *tag, dsl_dataset_t **);
|
||||
ds_hold_flags_t flags, const void *tag, dsl_dataset_t **);
|
||||
void dsl_dataset_remove_key_mapping(dsl_dataset_t *ds);
|
||||
int dsl_dataset_hold_obj(struct dsl_pool *dp, uint64_t dsobj,
|
||||
void *tag, dsl_dataset_t **);
|
||||
const void *tag, dsl_dataset_t **);
|
||||
void dsl_dataset_rele_flags(dsl_dataset_t *ds, ds_hold_flags_t flags,
|
||||
void *tag);
|
||||
void dsl_dataset_rele(dsl_dataset_t *ds, void *tag);
|
||||
const void *tag);
|
||||
void dsl_dataset_rele(dsl_dataset_t *ds, const void *tag);
|
||||
int dsl_dataset_own(struct dsl_pool *dp, const char *name,
|
||||
ds_hold_flags_t flags, void *tag, dsl_dataset_t **dsp);
|
||||
ds_hold_flags_t flags, const void *tag, dsl_dataset_t **dsp);
|
||||
int dsl_dataset_own_force(struct dsl_pool *dp, const char *name,
|
||||
ds_hold_flags_t flags, void *tag, dsl_dataset_t **dsp);
|
||||
ds_hold_flags_t flags, const void *tag, dsl_dataset_t **dsp);
|
||||
int dsl_dataset_own_obj(struct dsl_pool *dp, uint64_t dsobj,
|
||||
ds_hold_flags_t flags, void *tag, dsl_dataset_t **dsp);
|
||||
ds_hold_flags_t flags, const void *tag, dsl_dataset_t **dsp);
|
||||
int dsl_dataset_own_obj_force(struct dsl_pool *dp, uint64_t dsobj,
|
||||
ds_hold_flags_t flags, void *tag, dsl_dataset_t **dsp);
|
||||
void dsl_dataset_disown(dsl_dataset_t *ds, ds_hold_flags_t flags, void *tag);
|
||||
ds_hold_flags_t flags, const void *tag, dsl_dataset_t **dsp);
|
||||
void dsl_dataset_disown(dsl_dataset_t *ds, ds_hold_flags_t flags,
|
||||
const void *tag);
|
||||
void dsl_dataset_name(dsl_dataset_t *ds, char *name);
|
||||
boolean_t dsl_dataset_tryown(dsl_dataset_t *ds, void *tag, boolean_t override);
|
||||
boolean_t dsl_dataset_tryown(dsl_dataset_t *ds, const void *tag,
|
||||
boolean_t override);
|
||||
int dsl_dataset_namelen(dsl_dataset_t *ds);
|
||||
boolean_t dsl_dataset_has_owner(dsl_dataset_t *ds);
|
||||
uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname,
|
||||
|
||||
@@ -177,9 +177,9 @@ void dsl_pool_mos_diduse_space(dsl_pool_t *dp,
|
||||
void dsl_pool_ckpoint_diduse_space(dsl_pool_t *dp,
|
||||
int64_t used, int64_t comp, int64_t uncomp);
|
||||
boolean_t dsl_pool_need_dirty_delay(dsl_pool_t *dp);
|
||||
void dsl_pool_config_enter(dsl_pool_t *dp, void *tag);
|
||||
void dsl_pool_config_enter_prio(dsl_pool_t *dp, void *tag);
|
||||
void dsl_pool_config_exit(dsl_pool_t *dp, void *tag);
|
||||
void dsl_pool_config_enter(dsl_pool_t *dp, const void *tag);
|
||||
void dsl_pool_config_enter_prio(dsl_pool_t *dp, const void *tag);
|
||||
void dsl_pool_config_exit(dsl_pool_t *dp, const void *tag);
|
||||
boolean_t dsl_pool_config_held(dsl_pool_t *dp);
|
||||
boolean_t dsl_pool_config_held_writer(dsl_pool_t *dp);
|
||||
|
||||
@@ -192,8 +192,8 @@ int dsl_pool_user_release(dsl_pool_t *dp, uint64_t dsobj,
|
||||
const char *tag, dmu_tx_t *tx);
|
||||
void dsl_pool_clean_tmp_userrefs(dsl_pool_t *dp);
|
||||
int dsl_pool_open_special_dir(dsl_pool_t *dp, const char *name, dsl_dir_t **);
|
||||
int dsl_pool_hold(const char *name, void *tag, dsl_pool_t **dp);
|
||||
void dsl_pool_rele(dsl_pool_t *dp, void *tag);
|
||||
int dsl_pool_hold(const char *name, const void *tag, dsl_pool_t **dp);
|
||||
void dsl_pool_rele(dsl_pool_t *dp, const void *tag);
|
||||
|
||||
void dsl_pool_create_obsolete_bpobj(dsl_pool_t *dp, dmu_tx_t *tx);
|
||||
void dsl_pool_destroy_obsolete_bpobj(dsl_pool_t *dp, dmu_tx_t *tx);
|
||||
|
||||
@@ -72,11 +72,11 @@ typedef struct rrwlock {
|
||||
*/
|
||||
void rrw_init(rrwlock_t *rrl, boolean_t track_all);
|
||||
void rrw_destroy(rrwlock_t *rrl);
|
||||
void rrw_enter(rrwlock_t *rrl, krw_t rw, void *tag);
|
||||
void rrw_enter_read(rrwlock_t *rrl, void *tag);
|
||||
void rrw_enter_read_prio(rrwlock_t *rrl, void *tag);
|
||||
void rrw_enter(rrwlock_t *rrl, krw_t rw, const void *tag);
|
||||
void rrw_enter_read(rrwlock_t *rrl, const void *tag);
|
||||
void rrw_enter_read_prio(rrwlock_t *rrl, const void *tag);
|
||||
void rrw_enter_write(rrwlock_t *rrl);
|
||||
void rrw_exit(rrwlock_t *rrl, void *tag);
|
||||
void rrw_exit(rrwlock_t *rrl, const void *tag);
|
||||
boolean_t rrw_held(rrwlock_t *rrl, krw_t rw);
|
||||
void rrw_tsd_destroy(void *arg);
|
||||
|
||||
@@ -99,10 +99,10 @@ typedef struct rrmlock {
|
||||
|
||||
void rrm_init(rrmlock_t *rrl, boolean_t track_all);
|
||||
void rrm_destroy(rrmlock_t *rrl);
|
||||
void rrm_enter(rrmlock_t *rrl, krw_t rw, void *tag);
|
||||
void rrm_enter_read(rrmlock_t *rrl, void *tag);
|
||||
void rrm_enter(rrmlock_t *rrl, krw_t rw, const void *tag);
|
||||
void rrm_enter_read(rrmlock_t *rrl, const void *tag);
|
||||
void rrm_enter_write(rrmlock_t *rrl);
|
||||
void rrm_exit(rrmlock_t *rrl, void *tag);
|
||||
void rrm_exit(rrmlock_t *rrl, const void *tag);
|
||||
boolean_t rrm_held(rrmlock_t *rrl, krw_t rw);
|
||||
|
||||
#define RRM_READ_HELD(x) rrm_held(x, RW_READER)
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ typedef uint16_t sa_attr_type_t;
|
||||
* Attribute to register support for.
|
||||
*/
|
||||
typedef struct sa_attr_reg {
|
||||
char *sa_name; /* attribute name */
|
||||
const char *sa_name; /* attribute name */
|
||||
uint16_t sa_length;
|
||||
sa_bswap_type_t sa_byteswap; /* bswap function enum */
|
||||
sa_attr_type_t sa_attr; /* filled in during registration */
|
||||
|
||||
+10
-9
@@ -606,7 +606,7 @@ typedef struct blkptr {
|
||||
|
||||
#define SNPRINTF_BLKPTR(func, ws, buf, size, bp, type, checksum, compress) \
|
||||
{ \
|
||||
static const char *copyname[] = \
|
||||
static const char *const copyname[] = \
|
||||
{ "zero", "single", "double", "triple" }; \
|
||||
int len = 0; \
|
||||
int copies = 0; \
|
||||
@@ -743,8 +743,8 @@ typedef enum trim_type {
|
||||
} trim_type_t;
|
||||
|
||||
/* state manipulation functions */
|
||||
extern int spa_open(const char *pool, spa_t **, void *tag);
|
||||
extern int spa_open_rewind(const char *pool, spa_t **, void *tag,
|
||||
extern int spa_open(const char *pool, spa_t **, const void *tag);
|
||||
extern int spa_open_rewind(const char *pool, spa_t **, const void *tag,
|
||||
nvlist_t *policy, nvlist_t **config);
|
||||
extern int spa_get_stats(const char *pool, nvlist_t **config, char *altroot,
|
||||
size_t buflen);
|
||||
@@ -801,8 +801,8 @@ extern int spa_vdev_trim(spa_t *spa, nvlist_t *nv, uint64_t cmd_type,
|
||||
uint64_t rate, boolean_t partial, boolean_t secure, nvlist_t *vdev_errlist);
|
||||
extern int spa_vdev_setpath(spa_t *spa, uint64_t guid, const char *newpath);
|
||||
extern int spa_vdev_setfru(spa_t *spa, uint64_t guid, const char *newfru);
|
||||
extern int spa_vdev_split_mirror(spa_t *spa, char *newname, nvlist_t *config,
|
||||
nvlist_t *props, boolean_t exp);
|
||||
extern int spa_vdev_split_mirror(spa_t *spa, const char *newname,
|
||||
nvlist_t *config, nvlist_t *props, boolean_t exp);
|
||||
|
||||
/* spare state (which is global across all pools) */
|
||||
extern void spa_spare_add(vdev_t *vd);
|
||||
@@ -860,9 +860,9 @@ extern void spa_remove(spa_t *spa);
|
||||
extern spa_t *spa_next(spa_t *prev);
|
||||
|
||||
/* Refcount functions */
|
||||
extern void spa_open_ref(spa_t *spa, void *tag);
|
||||
extern void spa_close(spa_t *spa, void *tag);
|
||||
extern void spa_async_close(spa_t *spa, void *tag);
|
||||
extern void spa_open_ref(spa_t *spa, const void *tag);
|
||||
extern void spa_close(spa_t *spa, const void *tag);
|
||||
extern void spa_async_close(spa_t *spa, const void *tag);
|
||||
extern boolean_t spa_refcount_zero(spa_t *spa);
|
||||
|
||||
#define SCL_NONE 0x00
|
||||
@@ -971,7 +971,8 @@ extern int spa_import_progress_set_state(uint64_t pool_guid,
|
||||
spa_load_state_t spa_load_state);
|
||||
|
||||
/* Pool configuration locks */
|
||||
extern int spa_config_tryenter(spa_t *spa, int locks, void *tag, krw_t rw);
|
||||
extern int spa_config_tryenter(spa_t *spa, int locks, const void *tag,
|
||||
krw_t rw);
|
||||
extern void spa_config_enter(spa_t *spa, int locks, const void *tag, krw_t rw);
|
||||
extern void spa_config_exit(spa_t *spa, int locks, const void *tag);
|
||||
extern int spa_config_held(spa_t *spa, int locks, krw_t rw);
|
||||
|
||||
@@ -112,15 +112,13 @@ extern zfs_fuid_info_t *zfs_fuid_info_alloc(void);
|
||||
extern void zfs_fuid_info_free(zfs_fuid_info_t *);
|
||||
extern boolean_t zfs_groupmember(zfsvfs_t *, uint64_t, cred_t *);
|
||||
void zfs_fuid_sync(zfsvfs_t *, dmu_tx_t *);
|
||||
extern int zfs_fuid_find_by_domain(zfsvfs_t *, const char *domain,
|
||||
char **retdomain, boolean_t addok);
|
||||
extern const char *zfs_fuid_find_by_idx(zfsvfs_t *zfsvfs, uint32_t idx);
|
||||
extern void zfs_fuid_txhold(zfsvfs_t *zfsvfs, dmu_tx_t *tx);
|
||||
extern int zfs_id_to_fuidstr(zfsvfs_t *zfsvfs, const char *domain, uid_t rid,
|
||||
char *buf, size_t len, boolean_t addok);
|
||||
#endif
|
||||
|
||||
char *zfs_fuid_idx_domain(avl_tree_t *, uint32_t);
|
||||
const char *zfs_fuid_idx_domain(avl_tree_t *, uint32_t);
|
||||
void zfs_fuid_avl_tree_create(avl_tree_t *, avl_tree_t *);
|
||||
uint64_t zfs_fuid_table_load(objset_t *, uint64_t, avl_tree_t *, avl_tree_t *);
|
||||
void zfs_fuid_table_destroy(avl_tree_t *, avl_tree_t *);
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef const struct zio_checksum_info {
|
||||
zio_checksum_tmpl_init_t *ci_tmpl_init;
|
||||
zio_checksum_tmpl_free_t *ci_tmpl_free;
|
||||
zio_checksum_flags_t ci_flags;
|
||||
char *ci_name; /* descriptive name */
|
||||
const char *ci_name; /* descriptive name */
|
||||
} zio_checksum_info_t;
|
||||
|
||||
typedef struct zio_bad_cksum {
|
||||
@@ -102,7 +102,7 @@ typedef struct zio_bad_cksum {
|
||||
uint8_t zbc_has_cksum; /* expected/actual valid */
|
||||
} zio_bad_cksum_t;
|
||||
|
||||
_SYS_ZIO_CHECKSUM_H zio_checksum_info_t
|
||||
_SYS_ZIO_CHECKSUM_H const zio_checksum_info_t
|
||||
zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS];
|
||||
|
||||
/*
|
||||
|
||||
@@ -145,14 +145,14 @@ typedef int zio_decompress_abd_func_t(abd_t *src, void *dst,
|
||||
* Information about each compression function.
|
||||
*/
|
||||
typedef const struct zio_compress_info {
|
||||
char *ci_name;
|
||||
const char *ci_name;
|
||||
int ci_level;
|
||||
zio_compress_func_t *ci_compress;
|
||||
zio_decompress_func_t *ci_decompress;
|
||||
zio_decompresslevel_func_t *ci_decompress_level;
|
||||
} zio_compress_info_t;
|
||||
|
||||
extern zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS];
|
||||
extern const zio_compress_info_t zio_compress_table[ZIO_COMPRESS_FUNCTIONS];
|
||||
|
||||
/*
|
||||
* lz4 compression init & free
|
||||
|
||||
@@ -67,7 +67,7 @@ typedef struct zio_crypt_info {
|
||||
size_t ci_keylen;
|
||||
|
||||
/* human-readable name of the encryption algorithm */
|
||||
char *ci_name;
|
||||
const char *ci_name;
|
||||
} zio_crypt_info_t;
|
||||
|
||||
extern const zio_crypt_info_t zio_crypt_table[ZIO_CRYPT_FUNCTIONS];
|
||||
|
||||
Reference in New Issue
Block a user