185 boolean_t recursive;
186 boolean_t gotone;
187 boolean_t temphold;
188 char failed[MAXPATHLEN];
189 };
190
191 #define dsl_dataset_is_snapshot(ds) \
192 ((ds)->ds_phys->ds_num_children != 0)
193
194 #define DS_UNIQUE_IS_ACCURATE(ds) \
195 (((ds)->ds_phys->ds_flags & DS_FLAG_UNIQUE_ACCURATE) != 0)
196
197 int dsl_dataset_hold(const char *name, void *tag, dsl_dataset_t **dsp);
198 int dsl_dataset_hold_obj(struct dsl_pool *dp, uint64_t dsobj,
199 void *tag, dsl_dataset_t **);
200 int dsl_dataset_own(const char *name, boolean_t inconsistentok,
201 void *tag, dsl_dataset_t **dsp);
202 int dsl_dataset_own_obj(struct dsl_pool *dp, uint64_t dsobj,
203 boolean_t inconsistentok, void *tag, dsl_dataset_t **dsp);
204 void dsl_dataset_name(dsl_dataset_t *ds, char *name);
205 void dsl_dataset_rele(dsl_dataset_t *ds, void *tag);
206 void dsl_dataset_disown(dsl_dataset_t *ds, void *tag);
207 void dsl_dataset_drop_ref(dsl_dataset_t *ds, void *tag);
208 boolean_t dsl_dataset_tryown(dsl_dataset_t *ds, boolean_t inconsistentok,
209 void *tag);
210 void dsl_dataset_make_exclusive(dsl_dataset_t *ds, void *tag);
211 void dsl_register_onexit_hold_cleanup(dsl_dataset_t *ds, const char *htag,
212 minor_t minor);
213 uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname,
214 dsl_dataset_t *origin, uint64_t flags, cred_t *, dmu_tx_t *);
215 uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin,
216 uint64_t flags, dmu_tx_t *tx);
217 int dsl_dataset_destroy(dsl_dataset_t *ds, void *tag, boolean_t defer);
218 dsl_checkfunc_t dsl_dataset_destroy_check;
219 dsl_syncfunc_t dsl_dataset_destroy_sync;
220 dsl_syncfunc_t dsl_dataset_user_hold_sync;
221 int dsl_dataset_snapshot_check(dsl_dataset_t *ds, const char *, dmu_tx_t *tx);
222 void dsl_dataset_snapshot_sync(dsl_dataset_t *ds, const char *, dmu_tx_t *tx);
223 int dsl_dataset_rename(char *name, const char *newname, boolean_t recursive);
224 int dsl_dataset_promote(const char *name, char *conflsnap);
|
185 boolean_t recursive;
186 boolean_t gotone;
187 boolean_t temphold;
188 char failed[MAXPATHLEN];
189 };
190
191 #define dsl_dataset_is_snapshot(ds) \
192 ((ds)->ds_phys->ds_num_children != 0)
193
194 #define DS_UNIQUE_IS_ACCURATE(ds) \
195 (((ds)->ds_phys->ds_flags & DS_FLAG_UNIQUE_ACCURATE) != 0)
196
197 int dsl_dataset_hold(const char *name, void *tag, dsl_dataset_t **dsp);
198 int dsl_dataset_hold_obj(struct dsl_pool *dp, uint64_t dsobj,
199 void *tag, dsl_dataset_t **);
200 int dsl_dataset_own(const char *name, boolean_t inconsistentok,
201 void *tag, dsl_dataset_t **dsp);
202 int dsl_dataset_own_obj(struct dsl_pool *dp, uint64_t dsobj,
203 boolean_t inconsistentok, void *tag, dsl_dataset_t **dsp);
204 void dsl_dataset_name(dsl_dataset_t *ds, char *name);
205 int dsl_dataset_namelen(dsl_dataset_t *ds);
206 void dsl_dataset_rele(dsl_dataset_t *ds, void *tag);
207 void dsl_dataset_disown(dsl_dataset_t *ds, void *tag);
208 void dsl_dataset_drop_ref(dsl_dataset_t *ds, void *tag);
209 boolean_t dsl_dataset_tryown(dsl_dataset_t *ds, boolean_t inconsistentok,
210 void *tag);
211 void dsl_dataset_make_exclusive(dsl_dataset_t *ds, void *tag);
212 void dsl_register_onexit_hold_cleanup(dsl_dataset_t *ds, const char *htag,
213 minor_t minor);
214 uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname,
215 dsl_dataset_t *origin, uint64_t flags, cred_t *, dmu_tx_t *);
216 uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin,
217 uint64_t flags, dmu_tx_t *tx);
218 int dsl_dataset_destroy(dsl_dataset_t *ds, void *tag, boolean_t defer);
219 dsl_checkfunc_t dsl_dataset_destroy_check;
220 dsl_syncfunc_t dsl_dataset_destroy_sync;
221 dsl_syncfunc_t dsl_dataset_user_hold_sync;
222 int dsl_dataset_snapshot_check(dsl_dataset_t *ds, const char *, dmu_tx_t *tx);
223 void dsl_dataset_snapshot_sync(dsl_dataset_t *ds, const char *, dmu_tx_t *tx);
224 int dsl_dataset_rename(char *name, const char *newname, boolean_t recursive);
225 int dsl_dataset_promote(const char *name, char *conflsnap);
|