249 * operation, including metadata.
250 */
251 #define DMU_MAX_ACCESS (10<<20) /* 10MB */
252 #define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
253
254 #define DMU_USERUSED_OBJECT (-1ULL)
255 #define DMU_GROUPUSED_OBJECT (-2ULL)
256
257 /*
258 * artificial blkids for bonus buffer and spill blocks
259 */
260 #define DMU_BONUS_BLKID (-1ULL)
261 #define DMU_SPILL_BLKID (-2ULL)
262 /*
263 * Public routines to create, destroy, open, and close objsets.
264 */
265 int dmu_objset_hold(const char *name, void *tag, objset_t **osp);
266 int dmu_objset_own(const char *name, dmu_objset_type_t type,
267 boolean_t readonly, void *tag, objset_t **osp);
268 void dmu_objset_rele(objset_t *os, void *tag);
269 void dmu_objset_disown(objset_t *os, void *tag);
270 int dmu_objset_open_ds(struct dsl_dataset *ds, objset_t **osp);
271
272 void dmu_objset_evict_dbufs(objset_t *os);
273 int dmu_objset_create(const char *name, dmu_objset_type_t type, uint64_t flags,
274 void (*func)(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx), void *arg);
275 int dmu_objset_clone(const char *name, const char *origin);
276 int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer,
277 struct nvlist *errlist);
278 int dmu_objset_snapshot_one(const char *fsname, const char *snapname);
279 int dmu_objset_snapshot_tmp(const char *, const char *, int);
280 int dmu_objset_find(char *name, int func(const char *, void *), void *arg,
281 int flags);
282 void dmu_objset_byteswap(void *buf, size_t size);
283 int dsl_dataset_rename_snapshot(const char *fsname,
284 const char *oldsnapname, const char *newsnapname, boolean_t recursive);
285
286 typedef struct dmu_buf {
287 uint64_t db_object; /* object that this buffer is part of */
288 uint64_t db_offset; /* byte offset in this object */
|
249 * operation, including metadata.
250 */
251 #define DMU_MAX_ACCESS (10<<20) /* 10MB */
252 #define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
253
254 #define DMU_USERUSED_OBJECT (-1ULL)
255 #define DMU_GROUPUSED_OBJECT (-2ULL)
256
257 /*
258 * artificial blkids for bonus buffer and spill blocks
259 */
260 #define DMU_BONUS_BLKID (-1ULL)
261 #define DMU_SPILL_BLKID (-2ULL)
262 /*
263 * Public routines to create, destroy, open, and close objsets.
264 */
265 int dmu_objset_hold(const char *name, void *tag, objset_t **osp);
266 int dmu_objset_own(const char *name, dmu_objset_type_t type,
267 boolean_t readonly, void *tag, objset_t **osp);
268 void dmu_objset_rele(objset_t *os, void *tag);
269 void dmu_objset_rele_obj(objset_t *os, void *tag);
270 void dmu_objset_disown(objset_t *os, void *tag);
271 int dmu_objset_open_ds(struct dsl_dataset *ds, objset_t **osp);
272
273 void dmu_objset_evict_dbufs(objset_t *os);
274 int dmu_objset_create(const char *name, dmu_objset_type_t type, uint64_t flags,
275 void (*func)(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx), void *arg);
276 int dmu_objset_clone(const char *name, const char *origin);
277 int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer,
278 struct nvlist *errlist);
279 int dmu_objset_snapshot_one(const char *fsname, const char *snapname);
280 int dmu_objset_snapshot_tmp(const char *, const char *, int);
281 int dmu_objset_find(char *name, int func(const char *, void *), void *arg,
282 int flags);
283 void dmu_objset_byteswap(void *buf, size_t size);
284 int dsl_dataset_rename_snapshot(const char *fsname,
285 const char *oldsnapname, const char *newsnapname, boolean_t recursive);
286
287 typedef struct dmu_buf {
288 uint64_t db_object; /* object that this buffer is part of */
289 uint64_t db_offset; /* byte offset in this object */
|