mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Use dsl_dataset_snap_lookup()
Retire the dmu_snapshot_id() function which was introduced in the initial .zfs control directory implementation. There is already an existing dsl_dataset_snap_lookup() which does exactly what we need, and the dmu_snapshot_id() function as implemented is racy. https://github.com/zfsonlinux/zfs/issues/1215#issuecomment-12579879 Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1238
This commit is contained in:
+1
-1
@@ -731,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,
|
||||
|
||||
@@ -251,6 +251,8 @@ int dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp,
|
||||
boolean_t dsl_dataset_block_freeable(dsl_dataset_t *ds, const blkptr_t *bp,
|
||||
uint64_t blk_birth);
|
||||
uint64_t dsl_dataset_prev_snap_txg(dsl_dataset_t *ds);
|
||||
int dsl_dataset_snap_lookup(dsl_dataset_t *ds, const char *name,
|
||||
uint64_t *value);
|
||||
|
||||
void dsl_dataset_dirty(dsl_dataset_t *ds, dmu_tx_t *tx);
|
||||
void dsl_dataset_stats(dsl_dataset_t *os, nvlist_t *nv);
|
||||
|
||||
Reference in New Issue
Block a user