225 uint64_t dn_olduid, dn_oldgid;
226 uint64_t dn_newuid, dn_newgid;
227 int dn_id_flags;
228
229 /* holds prefetch structure */
230 struct zfetch dn_zfetch;
231 } dnode_t;
232
233 /*
234 * Adds a level of indirection between the dbuf and the dnode to avoid
235 * iterating descendent dbufs in dnode_move(). Handles are not allocated
236 * individually, but as an array of child dnodes in dnode_hold_impl().
237 */
238 typedef struct dnode_handle {
239 /* Protects dnh_dnode from modification by dnode_move(). */
240 zrlock_t dnh_zrlock;
241 dnode_t *dnh_dnode;
242 } dnode_handle_t;
243
244 typedef struct dnode_children {
245 size_t dnc_count; /* number of children */
246 dnode_handle_t dnc_children[1]; /* sized dynamically */
247 } dnode_children_t;
248
249 typedef struct free_range {
250 avl_node_t fr_node;
251 uint64_t fr_blkid;
252 uint64_t fr_nblks;
253 } free_range_t;
254
255 dnode_t *dnode_special_open(struct objset *dd, dnode_phys_t *dnp,
256 uint64_t object, dnode_handle_t *dnh);
257 void dnode_special_close(dnode_handle_t *dnh);
258
259 void dnode_setbonuslen(dnode_t *dn, int newsize, dmu_tx_t *tx);
260 void dnode_setbonus_type(dnode_t *dn, dmu_object_type_t, dmu_tx_t *tx);
261 void dnode_rm_spill(dnode_t *dn, dmu_tx_t *tx);
262
263 int dnode_hold(struct objset *dd, uint64_t object,
264 void *ref, dnode_t **dnp);
|
225 uint64_t dn_olduid, dn_oldgid;
226 uint64_t dn_newuid, dn_newgid;
227 int dn_id_flags;
228
229 /* holds prefetch structure */
230 struct zfetch dn_zfetch;
231 } dnode_t;
232
233 /*
234 * Adds a level of indirection between the dbuf and the dnode to avoid
235 * iterating descendent dbufs in dnode_move(). Handles are not allocated
236 * individually, but as an array of child dnodes in dnode_hold_impl().
237 */
238 typedef struct dnode_handle {
239 /* Protects dnh_dnode from modification by dnode_move(). */
240 zrlock_t dnh_zrlock;
241 dnode_t *dnh_dnode;
242 } dnode_handle_t;
243
244 typedef struct dnode_children {
245 dmu_buf_user_t db_evict; /* User evict data */
246 size_t dnc_count; /* number of children */
247 dnode_handle_t dnc_children[1]; /* sized dynamically */
248 } dnode_children_t;
249
250 typedef struct free_range {
251 avl_node_t fr_node;
252 uint64_t fr_blkid;
253 uint64_t fr_nblks;
254 } free_range_t;
255
256 dnode_t *dnode_special_open(struct objset *dd, dnode_phys_t *dnp,
257 uint64_t object, dnode_handle_t *dnh);
258 void dnode_special_close(dnode_handle_t *dnh);
259
260 void dnode_setbonuslen(dnode_t *dn, int newsize, dmu_tx_t *tx);
261 void dnode_setbonus_type(dnode_t *dn, dmu_object_type_t, dmu_tx_t *tx);
262 void dnode_rm_spill(dnode_t *dn, dmu_tx_t *tx);
263
264 int dnode_hold(struct objset *dd, uint64_t object,
265 void *ref, dnode_t **dnp);
|