FreeBSD ZFS
The Zettabyte File System
|
#include <sys/dmu_objset.h>
#include <sys/dsl_dataset.h>
#include <sys/dsl_dir.h>
#include <sys/dsl_prop.h>
#include <sys/dsl_synctask.h>
#include <sys/dmu_traverse.h>
#include <sys/dmu_impl.h>
#include <sys/dmu_tx.h>
#include <sys/arc.h>
#include <sys/zio.h>
#include <sys/zap.h>
#include <sys/zfeature.h>
#include <sys/unique.h>
#include <sys/zfs_context.h>
#include <sys/zfs_ioctl.h>
#include <sys/spa.h>
#include <sys/zfs_znode.h>
#include <sys/zfs_onexit.h>
#include <sys/zvol.h>
#include <sys/dsl_scan.h>
#include <sys/dsl_deadlist.h>
Go to the source code of this file.
Data Structures | |
struct | killarg |
struct | refsarg |
struct | process_old_arg |
struct | renamesnaparg |
struct | promotenode |
struct | promotearg |
struct | cloneswaparg |
struct | zfs_hold_cleanup_arg |
struct | dsl_ds_releasearg |
Defines | |
#define | SWITCH64(x, y) |
#define | DS_REF_MAX (1ULL << 62) |
#define | DSL_DEADLIST_BLOCKSIZE SPA_MAXBLOCKSIZE |
#define | DSL_DATASET_IS_DESTROYED(ds) ((ds)->ds_owner == dsl_reaper) |
Typedefs | |
typedef struct zfs_hold_cleanup_arg | zfs_hold_cleanup_arg_t |
Functions | |
static int64_t | parent_delta (dsl_dataset_t *ds, int64_t delta) |
Figure out how much of this delta should be propogated to the dsl_dir layer. | |
void | dsl_dataset_block_born (dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx) |
int | dsl_dataset_block_kill (dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx, boolean_t async) |
uint64_t | dsl_dataset_prev_snap_txg (dsl_dataset_t *ds) |
boolean_t | dsl_dataset_block_freeable (dsl_dataset_t *ds, const blkptr_t *bp, uint64_t blk_birth) |
static void | dsl_dataset_evict (dmu_buf_t *db, void *dsv) |
static int | dsl_dataset_get_snapname (dsl_dataset_t *ds) |
static int | dsl_dataset_snap_lookup (dsl_dataset_t *ds, const char *name, uint64_t *value) |
static int | dsl_dataset_snap_remove (dsl_dataset_t *ds, char *name, dmu_tx_t *tx) |
static int | dsl_dataset_get_ref (dsl_pool_t *dp, uint64_t dsobj, void *tag, dsl_dataset_t **dsp) |
static int | dsl_dataset_hold_ref (dsl_dataset_t *ds, void *tag) |
int | dsl_dataset_hold_obj (dsl_pool_t *dp, uint64_t dsobj, void *tag, dsl_dataset_t **dsp) |
int | dsl_dataset_own_obj (dsl_pool_t *dp, uint64_t dsobj, boolean_t inconsistentok, void *tag, dsl_dataset_t **dsp) |
int | dsl_dataset_hold (const char *name, void *tag, dsl_dataset_t **dsp) |
int | dsl_dataset_own (const char *name, boolean_t inconsistentok, void *tag, dsl_dataset_t **dsp) |
void | dsl_dataset_name (dsl_dataset_t *ds, char *name) |
static int | dsl_dataset_namelen (dsl_dataset_t *ds) |
void | dsl_dataset_drop_ref (dsl_dataset_t *ds, void *tag) |
void | dsl_dataset_rele (dsl_dataset_t *ds, void *tag) |
void | dsl_dataset_disown (dsl_dataset_t *ds, void *tag) |
boolean_t | dsl_dataset_tryown (dsl_dataset_t *ds, boolean_t inconsistentok, void *tag) |
void | dsl_dataset_make_exclusive (dsl_dataset_t *ds, void *owner) |
uint64_t | dsl_dataset_create_sync_dd (dsl_dir_t *dd, dsl_dataset_t *origin, uint64_t flags, dmu_tx_t *tx) |
uint64_t | dsl_dataset_create_sync (dsl_dir_t *pdd, const char *lastname, dsl_dataset_t *origin, uint64_t flags, cred_t *cr, dmu_tx_t *tx) |
int | dmu_snapshots_destroy_nvl (nvlist_t *snaps, boolean_t defer, char *failed) |
Destroy 'snapname' in all descendants of 'fsname'. | |
static boolean_t | dsl_dataset_might_destroy_origin (dsl_dataset_t *ds) |
static int | dsl_dataset_origin_rm_prep (struct dsl_ds_destroyarg *dsda, void *tag) |
If we're removing a clone, and these three conditions are true:
| |
int | dsl_dataset_destroy (dsl_dataset_t *ds, void *tag, boolean_t defer) |
ds must be opened as OWNER. | |
blkptr_t * | dsl_dataset_get_blkptr (dsl_dataset_t *ds) |
void | dsl_dataset_set_blkptr (dsl_dataset_t *ds, blkptr_t *bp, dmu_tx_t *tx) |
spa_t * | dsl_dataset_get_spa (dsl_dataset_t *ds) |
void | dsl_dataset_dirty (dsl_dataset_t *ds, dmu_tx_t *tx) |
boolean_t | dsl_dataset_is_dirty (dsl_dataset_t *ds) |
static void | dsl_dataset_recalc_head_uniq (dsl_dataset_t *ds) |
The unique space in the head dataset can be calculated by subtracting the space used in the most recent snapshot, that is still being used in this file system, from the space currently in use. | |
static int | kill_blkptr (spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) |
static int | dsl_dataset_destroy_begin_check (void *arg1, void *arg2, dmu_tx_t *tx) |
static void | dsl_dataset_destroy_begin_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
static int | dsl_dataset_origin_check (struct dsl_ds_destroyarg *dsda, void *tag, dmu_tx_t *tx) |
int | dsl_dataset_destroy_check (void *arg1, void *arg2, dmu_tx_t *tx) |
If you add new checks here, you may need to add additional checks to the "temporary" case in snapshot_check() in dmu_objset.c. | |
static void | dsl_dataset_refs_gone (dmu_buf_t *db, void *argv) |
static void | dsl_dataset_drain_refs (dsl_dataset_t *ds, void *tag) |
static void | remove_from_next_clones (dsl_dataset_t *ds, uint64_t obj, dmu_tx_t *tx) |
static void | dsl_dataset_remove_clones_key (dsl_dataset_t *ds, uint64_t mintxg, dmu_tx_t *tx) |
static int | process_old_cb (void *arg, const blkptr_t *bp, dmu_tx_t *tx) |
static void | process_old_deadlist (dsl_dataset_t *ds, dsl_dataset_t *ds_prev, dsl_dataset_t *ds_next, boolean_t after_branch_point, dmu_tx_t *tx) |
static int | old_synchronous_dataset_destroy (dsl_dataset_t *ds, dmu_tx_t *tx) |
void | dsl_dataset_destroy_sync (void *arg1, void *tag, dmu_tx_t *tx) |
static int | dsl_dataset_snapshot_reserve_space (dsl_dataset_t *ds, dmu_tx_t *tx) |
int | dsl_dataset_snapshot_check (void *arg1, void *arg2, dmu_tx_t *tx) |
void | dsl_dataset_snapshot_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
void | dsl_dataset_sync (dsl_dataset_t *ds, zio_t *zio, dmu_tx_t *tx) |
static void | get_clones_stat (dsl_dataset_t *ds, nvlist_t *nv) |
void | dsl_dataset_stats (dsl_dataset_t *ds, nvlist_t *nv) |
void | dsl_dataset_fast_stat (dsl_dataset_t *ds, dmu_objset_stats_t *stat) |
uint64_t | dsl_dataset_fsid_guid (dsl_dataset_t *ds) |
void | dsl_dataset_space (dsl_dataset_t *ds, uint64_t *refdbytesp, uint64_t *availbytesp, uint64_t *usedobjsp, uint64_t *availobjsp) |
boolean_t | dsl_dataset_modified_since_lastsnap (dsl_dataset_t *ds) |
static int | dsl_dataset_snapshot_rename_check (void *arg1, void *arg2, dmu_tx_t *tx) |
static void | dsl_dataset_snapshot_rename_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
static int | dsl_snapshot_rename_one (const char *name, void *arg) |
static int | dsl_recursive_rename (char *oldname, const char *newname) |
static int | dsl_valid_rename (const char *oldname, void *arg) |
int | dsl_dataset_rename (char *oldname, const char *newname, int flags) |
static int | snaplist_space (list_t *l, uint64_t mintxg, uint64_t *spacep) |
static boolean_t | snaplist_unstable (list_t *l) |
static int | dsl_dataset_promote_check (void *arg1, void *arg2, dmu_tx_t *tx) |
static void | dsl_dataset_promote_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
static int | snaplist_make (dsl_pool_t *dp, boolean_t own, uint64_t first_obj, uint64_t last_obj, list_t *l) |
Make a list of dsl_dataset_t's for the snapshots between first_obj (exclusive) and last_obj (inclusive). | |
static void | snaplist_destroy (list_t *l, boolean_t own) |
int | dsl_dataset_promote (const char *name, char *conflsnap) |
Promote a clone. | |
static int | dsl_dataset_clone_swap_check (void *arg1, void *arg2, dmu_tx_t *tx) |
static void | dsl_dataset_clone_swap_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
int | dsl_dataset_clone_swap (dsl_dataset_t *clone, dsl_dataset_t *origin_head, boolean_t force) |
Swap 'clone' with its origin head datasets. | |
int | dsl_dsobj_to_dsname (char *pname, uint64_t obj, char *buf) |
Find the name of a dataset. | |
int | dsl_dataset_check_quota (dsl_dataset_t *ds, boolean_t check_quota, uint64_t asize, uint64_t inflight, uint64_t *used, uint64_t *ref_rsrv) |
static int | dsl_dataset_set_quota_check (void *arg1, void *arg2, dmu_tx_t *tx) |
void | dsl_prop_set_sync (void *, void *, dmu_tx_t *) |
void | dsl_dataset_set_quota_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
int | dsl_dataset_set_quota (const char *dsname, zprop_source_t source, uint64_t quota) |
static int | dsl_dataset_set_reservation_check (void *arg1, void *arg2, dmu_tx_t *tx) |
static void | dsl_dataset_set_reservation_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
int | dsl_dataset_set_reservation (const char *dsname, zprop_source_t source, uint64_t reservation) |
static void | dsl_dataset_user_release_onexit (void *arg) |
void | dsl_register_onexit_hold_cleanup (dsl_dataset_t *ds, const char *htag, minor_t minor) |
static int | dsl_dataset_user_hold_check (void *arg1, void *arg2, dmu_tx_t *tx) |
If you add new checks here, you may need to add additional checks to the "temporary" case in snapshot_check() in dmu_objset.c. | |
void | dsl_dataset_user_hold_sync (void *arg1, void *arg2, dmu_tx_t *tx) |
static int | dsl_dataset_user_hold_one (const char *dsname, void *arg) |
int | dsl_dataset_user_hold_for_send (dsl_dataset_t *ds, char *htag, boolean_t temphold) |
int | dsl_dataset_user_hold (char *dsname, char *snapname, char *htag, boolean_t recursive, boolean_t temphold, int cleanup_fd) |
static int | dsl_dataset_release_might_destroy (dsl_dataset_t *ds, const char *htag, boolean_t *might_destroy) |
static int | dsl_dataset_user_release_check (void *arg1, void *tag, dmu_tx_t *tx) |
static void | dsl_dataset_user_release_sync (void *arg1, void *tag, dmu_tx_t *tx) |
static int | dsl_dataset_user_release_one (const char *dsname, void *arg) |
int | dsl_dataset_user_release (char *dsname, char *snapname, char *htag, boolean_t recursive) |
int | dsl_dataset_user_release_tmp (dsl_pool_t *dp, uint64_t dsobj, char *htag, boolean_t retry) |
Called at spa_load time (with retry == B_FALSE) to release a stale temporary user hold. | |
int | dsl_dataset_get_holds (const char *dsname, nvlist_t **nvp) |
int | dsl_destroy_inconsistent (const char *dsname, void *arg) |
int | dsl_dataset_space_written (dsl_dataset_t *oldsnap, dsl_dataset_t *new, uint64_t *usedp, uint64_t *compp, uint64_t *uncompp) |
int | dsl_dataset_space_wouldfree (dsl_dataset_t *firstsnap, dsl_dataset_t *lastsnap, uint64_t *usedp, uint64_t *compp, uint64_t *uncompp) |
Variables | |
static char * | dsl_reaper = "the grim reaper" |
static dsl_checkfunc_t | dsl_dataset_destroy_begin_check |
static dsl_syncfunc_t | dsl_dataset_destroy_begin_sync |
static dsl_syncfunc_t | dsl_dataset_set_reservation_sync |
static char * | snaplist_tag = "snaplist" |
#define DS_REF_MAX (1ULL << 62) |
Definition at line 65 of file dsl_dataset.c.
#define DSL_DATASET_IS_DESTROYED | ( | ds | ) | ((ds)->ds_owner == dsl_reaper) |
Definition at line 69 of file dsl_dataset.c.
#define DSL_DEADLIST_BLOCKSIZE SPA_MAXBLOCKSIZE |
Definition at line 67 of file dsl_dataset.c.
#define SWITCH64 | ( | x, | |
y | |||
) |
{ \ uint64_t __tmp = (x); \ (x) = (y); \ (y) = __tmp; \ }
Definition at line 58 of file dsl_dataset.c.
typedef struct zfs_hold_cleanup_arg zfs_hold_cleanup_arg_t |
int dmu_snapshots_destroy_nvl | ( | nvlist_t * | snaps, |
boolean_t | defer, | ||
char * | failed | ||
) |
Destroy 'snapname' in all descendants of 'fsname'.
The snapshots must all be in the same pool.
Definition at line 955 of file dsl_dataset.c.
void dsl_dataset_block_born | ( | dsl_dataset_t * | ds, |
const blkptr_t * | bp, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 93 of file dsl_dataset.c.
boolean_t dsl_dataset_block_freeable | ( | dsl_dataset_t * | ds, |
const blkptr_t * | bp, | ||
uint64_t | blk_birth | ||
) |
Definition at line 241 of file dsl_dataset.c.
int dsl_dataset_block_kill | ( | dsl_dataset_t * | ds, |
const blkptr_t * | bp, | ||
dmu_tx_t * | tx, | ||
boolean_t | async | ||
) |
Definition at line 131 of file dsl_dataset.c.
int dsl_dataset_check_quota | ( | dsl_dataset_t * | ds, |
boolean_t | check_quota, | ||
uint64_t | asize, | ||
uint64_t | inflight, | ||
uint64_t * | used, | ||
uint64_t * | ref_rsrv | ||
) |
Definition at line 3435 of file dsl_dataset.c.
int dsl_dataset_clone_swap | ( | dsl_dataset_t * | clone, |
dsl_dataset_t * | origin_head, | ||
boolean_t | force | ||
) |
Swap 'clone' with its origin head datasets.
Used at the end of "zfs recv" into an existing fs to swizzle the file system to the new version, and by "zfs rollback". Can also be used to swap two independent head datasets if neither has any snapshots.
Definition at line 3373 of file dsl_dataset.c.
static int dsl_dataset_clone_swap_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 3202 of file dsl_dataset.c.
static void dsl_dataset_clone_swap_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 3251 of file dsl_dataset.c.
uint64_t dsl_dataset_create_sync | ( | dsl_dir_t * | pdd, |
const char * | lastname, | ||
dsl_dataset_t * | origin, | ||
uint64_t | flags, | ||
cred_t * | cr, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 874 of file dsl_dataset.c.
uint64_t dsl_dataset_create_sync_dd | ( | dsl_dir_t * | dd, |
dsl_dataset_t * | origin, | ||
uint64_t | flags, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 775 of file dsl_dataset.c.
int dsl_dataset_destroy | ( | dsl_dataset_t * | ds, |
void * | tag, | ||
boolean_t | defer | ||
) |
ds must be opened as OWNER.
On return (whether successful or not), ds will be closed and caller can no longer dereference it.
Definition at line 1079 of file dsl_dataset.c.
static int dsl_dataset_destroy_begin_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 1341 of file dsl_dataset.c.
static void dsl_dataset_destroy_begin_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 1373 of file dsl_dataset.c.
int dsl_dataset_destroy_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) |
If you add new checks here, you may need to add additional checks to the "temporary" case in snapshot_check() in dmu_objset.c.
Definition at line 1429 of file dsl_dataset.c.
void dsl_dataset_destroy_sync | ( | void * | arg1, |
void * | tag, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 1684 of file dsl_dataset.c.
void dsl_dataset_dirty | ( | dsl_dataset_t * | ds, |
dmu_tx_t * | tx | ||
) |
Definition at line 1244 of file dsl_dataset.c.
void dsl_dataset_disown | ( | dsl_dataset_t * | ds, |
void * | tag | ||
) |
Definition at line 731 of file dsl_dataset.c.
static void dsl_dataset_drain_refs | ( | dsl_dataset_t * | ds, |
void * | tag | ||
) | [static] |
Definition at line 1513 of file dsl_dataset.c.
void dsl_dataset_drop_ref | ( | dsl_dataset_t * | ds, |
void * | tag | ||
) |
Definition at line 716 of file dsl_dataset.c.
static void dsl_dataset_evict | ( | dmu_buf_t * | db, |
void * | dsv | ||
) | [static] |
Definition at line 254 of file dsl_dataset.c.
void dsl_dataset_fast_stat | ( | dsl_dataset_t * | ds, |
dmu_objset_stats_t * | stat | ||
) |
Definition at line 2368 of file dsl_dataset.c.
uint64_t dsl_dataset_fsid_guid | ( | dsl_dataset_t * | ds | ) |
Definition at line 2397 of file dsl_dataset.c.
blkptr_t* dsl_dataset_get_blkptr | ( | dsl_dataset_t * | ds | ) |
Definition at line 1219 of file dsl_dataset.c.
int dsl_dataset_get_holds | ( | const char * | dsname, |
nvlist_t ** | nvp | ||
) |
Definition at line 4170 of file dsl_dataset.c.
static int dsl_dataset_get_ref | ( | dsl_pool_t * | dp, |
uint64_t | dsobj, | ||
void * | tag, | ||
dsl_dataset_t ** | dsp | ||
) | [static] |
Definition at line 362 of file dsl_dataset.c.
static int dsl_dataset_get_snapname | ( | dsl_dataset_t * | ds | ) | [static] |
Definition at line 296 of file dsl_dataset.c.
spa_t* dsl_dataset_get_spa | ( | dsl_dataset_t * | ds | ) |
Definition at line 1238 of file dsl_dataset.c.
int dsl_dataset_hold | ( | const char * | name, |
void * | tag, | ||
dsl_dataset_t ** | dsp | ||
) |
Definition at line 593 of file dsl_dataset.c.
int dsl_dataset_hold_obj | ( | dsl_pool_t * | dp, |
uint64_t | dsobj, | ||
void * | tag, | ||
dsl_dataset_t ** | dsp | ||
) |
Definition at line 567 of file dsl_dataset.c.
static int dsl_dataset_hold_ref | ( | dsl_dataset_t * | ds, |
void * | tag | ||
) | [static] |
Definition at line 513 of file dsl_dataset.c.
boolean_t dsl_dataset_is_dirty | ( | dsl_dataset_t * | ds | ) |
Definition at line 1265 of file dsl_dataset.c.
void dsl_dataset_make_exclusive | ( | dsl_dataset_t * | ds, |
void * | owner | ||
) |
Definition at line 767 of file dsl_dataset.c.
static boolean_t dsl_dataset_might_destroy_origin | ( | dsl_dataset_t * | ds | ) | [static] |
Definition at line 1021 of file dsl_dataset.c.
boolean_t dsl_dataset_modified_since_lastsnap | ( | dsl_dataset_t * | ds | ) |
Definition at line 2426 of file dsl_dataset.c.
void dsl_dataset_name | ( | dsl_dataset_t * | ds, |
char * | name | ||
) |
Definition at line 666 of file dsl_dataset.c.
static int dsl_dataset_namelen | ( | dsl_dataset_t * | ds | ) | [static] |
Definition at line 691 of file dsl_dataset.c.
static int dsl_dataset_origin_check | ( | struct dsl_ds_destroyarg * | dsda, |
void * | tag, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 1387 of file dsl_dataset.c.
static int dsl_dataset_origin_rm_prep | ( | struct dsl_ds_destroyarg * | dsda, |
void * | tag | ||
) | [static] |
If we're removing a clone, and these three conditions are true:
Then, prepare to remove the origin as part of this sync task group.
Definition at line 1043 of file dsl_dataset.c.
int dsl_dataset_own | ( | const char * | name, |
boolean_t | inconsistentok, | ||
void * | tag, | ||
dsl_dataset_t ** | dsp | ||
) |
Definition at line 652 of file dsl_dataset.c.
int dsl_dataset_own_obj | ( | dsl_pool_t * | dp, |
uint64_t | dsobj, | ||
boolean_t | inconsistentok, | ||
void * | tag, | ||
dsl_dataset_t ** | dsp | ||
) |
Definition at line 578 of file dsl_dataset.c.
uint64_t dsl_dataset_prev_snap_txg | ( | dsl_dataset_t * | ds | ) |
Definition at line 218 of file dsl_dataset.c.
int dsl_dataset_promote | ( | const char * | name, |
char * | conflsnap | ||
) |
Promote a clone.
Nomenclature note:
Definition at line 3108 of file dsl_dataset.c.
static int dsl_dataset_promote_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 2714 of file dsl_dataset.c.
static void dsl_dataset_promote_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 2843 of file dsl_dataset.c.
static void dsl_dataset_recalc_head_uniq | ( | dsl_dataset_t * | ds | ) | [static] |
The unique space in the head dataset can be calculated by subtracting the space used in the most recent snapshot, that is still being used in this file system, from the space currently in use.
To figure out the space in the most recent snapshot still in use, we need to take the total space used in the snapshot and subtract out the space that has been freed up since the snapshot was taken.
Definition at line 1284 of file dsl_dataset.c.
static void dsl_dataset_refs_gone | ( | dmu_buf_t * | db, |
void * | argv | ||
) | [static] |
Definition at line 1502 of file dsl_dataset.c.
void dsl_dataset_rele | ( | dsl_dataset_t * | ds, |
void * | tag | ||
) |
Definition at line 722 of file dsl_dataset.c.
static int dsl_dataset_release_might_destroy | ( | dsl_dataset_t * | ds, |
const char * | htag, | ||
boolean_t * | might_destroy | ||
) | [static] |
Definition at line 3883 of file dsl_dataset.c.
static void dsl_dataset_remove_clones_key | ( | dsl_dataset_t * | ds, |
uint64_t | mintxg, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 1563 of file dsl_dataset.c.
int dsl_dataset_rename | ( | char * | oldname, |
const char * | newname, | ||
int | flags | ||
) |
Definition at line 2640 of file dsl_dataset.c.
void dsl_dataset_set_blkptr | ( | dsl_dataset_t * | ds, |
blkptr_t * | bp, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 1225 of file dsl_dataset.c.
int dsl_dataset_set_quota | ( | const char * | dsname, |
zprop_source_t | source, | ||
uint64_t | quota | ||
) |
Definition at line 3525 of file dsl_dataset.c.
static int dsl_dataset_set_quota_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 3484 of file dsl_dataset.c.
void dsl_dataset_set_quota_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 3509 of file dsl_dataset.c.
int dsl_dataset_set_reservation | ( | const char * | dsname, |
zprop_source_t | source, | ||
uint64_t | reservation | ||
) |
Definition at line 3627 of file dsl_dataset.c.
static int dsl_dataset_set_reservation_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 3552 of file dsl_dataset.c.
static void dsl_dataset_set_reservation_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 3600 of file dsl_dataset.c.
static int dsl_dataset_snap_lookup | ( | dsl_dataset_t * | ds, |
const char * | name, | ||
uint64_t * | value | ||
) | [static] |
Definition at line 321 of file dsl_dataset.c.
static int dsl_dataset_snap_remove | ( | dsl_dataset_t * | ds, |
char * | name, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 341 of file dsl_dataset.c.
int dsl_dataset_snapshot_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 2068 of file dsl_dataset.c.
static int dsl_dataset_snapshot_rename_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 2455 of file dsl_dataset.c.
static void dsl_dataset_snapshot_rename_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 2486 of file dsl_dataset.c.
static int dsl_dataset_snapshot_reserve_space | ( | dsl_dataset_t * | ds, |
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 2040 of file dsl_dataset.c.
void dsl_dataset_snapshot_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 2107 of file dsl_dataset.c.
void dsl_dataset_space | ( | dsl_dataset_t * | ds, |
uint64_t * | refdbytesp, | ||
uint64_t * | availbytesp, | ||
uint64_t * | usedobjsp, | ||
uint64_t * | availobjsp | ||
) |
Definition at line 2403 of file dsl_dataset.c.
int dsl_dataset_space_wouldfree | ( | dsl_dataset_t * | firstsnap, |
dsl_dataset_t * | lastsnap, | ||
uint64_t * | usedp, | ||
uint64_t * | compp, | ||
uint64_t * | uncompp | ||
) |
Definition at line 4326 of file dsl_dataset.c.
int dsl_dataset_space_written | ( | dsl_dataset_t * | oldsnap, |
dsl_dataset_t * | new, | ||
uint64_t * | usedp, | ||
uint64_t * | compp, | ||
uint64_t * | uncompp | ||
) |
Definition at line 4238 of file dsl_dataset.c.
void dsl_dataset_stats | ( | dsl_dataset_t * | ds, |
nvlist_t * | nv | ||
) |
Definition at line 2301 of file dsl_dataset.c.
void dsl_dataset_sync | ( | dsl_dataset_t * | ds, |
zio_t * | zio, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 2223 of file dsl_dataset.c.
boolean_t dsl_dataset_tryown | ( | dsl_dataset_t * | ds, |
boolean_t | inconsistentok, | ||
void * | tag | ||
) |
Definition at line 750 of file dsl_dataset.c.
int dsl_dataset_user_hold | ( | char * | dsname, |
char * | snapname, | ||
char * | htag, | ||
boolean_t | recursive, | ||
boolean_t | temphold, | ||
int | cleanup_fd | ||
) |
Definition at line 3799 of file dsl_dataset.c.
static int dsl_dataset_user_hold_check | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) | [static] |
If you add new checks here, you may need to add additional checks to the "temporary" case in snapshot_check() in dmu_objset.c.
Definition at line 3685 of file dsl_dataset.c.
int dsl_dataset_user_hold_for_send | ( | dsl_dataset_t * | ds, |
char * | htag, | ||
boolean_t | temphold | ||
) |
Definition at line 3781 of file dsl_dataset.c.
static int dsl_dataset_user_hold_one | ( | const char * | dsname, |
void * | arg | ||
) | [static] |
Definition at line 3757 of file dsl_dataset.c.
void dsl_dataset_user_hold_sync | ( | void * | arg1, |
void * | arg2, | ||
dmu_tx_t * | tx | ||
) |
Definition at line 3719 of file dsl_dataset.c.
int dsl_dataset_user_release | ( | char * | dsname, |
char * | snapname, | ||
char * | htag, | ||
boolean_t | recursive | ||
) |
Definition at line 4051 of file dsl_dataset.c.
static int dsl_dataset_user_release_check | ( | void * | arg1, |
void * | tag, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 3919 of file dsl_dataset.c.
static int dsl_dataset_user_release_one | ( | const char * | dsname, |
void * | arg | ||
) | [static] |
Definition at line 3990 of file dsl_dataset.c.
static void dsl_dataset_user_release_onexit | ( | void * | arg | ) | [static] |
Definition at line 3656 of file dsl_dataset.c.
static void dsl_dataset_user_release_sync | ( | void * | arg1, |
void * | tag, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 3953 of file dsl_dataset.c.
int dsl_dataset_user_release_tmp | ( | dsl_pool_t * | dp, |
uint64_t | dsobj, | ||
char * | htag, | ||
boolean_t | retry | ||
) |
Called at spa_load time (with retry == B_FALSE) to release a stale temporary user hold.
Also called by the onexit code (with retry == B_TRUE).
Definition at line 4128 of file dsl_dataset.c.
int dsl_destroy_inconsistent | ( | const char * | dsname, |
void * | arg | ||
) |
Definition at line 4207 of file dsl_dataset.c.
int dsl_dsobj_to_dsname | ( | char * | pname, |
uint64_t | obj, | ||
char * | buf | ||
) |
Find the name of a dataset.
Given a pool name and a dataset object number in that pool, return the name of that dataset.
Definition at line 3413 of file dsl_dataset.c.
void dsl_prop_set_sync | ( | void * | , |
void * | , | ||
dmu_tx_t * | |||
) |
Definition at line 551 of file dsl_prop.c.
static int dsl_recursive_rename | ( | char * | oldname, |
const char * | newname | ||
) | [static] |
Definition at line 2571 of file dsl_dataset.c.
void dsl_register_onexit_hold_cleanup | ( | dsl_dataset_t * | ds, |
const char * | htag, | ||
minor_t | minor | ||
) |
Definition at line 3666 of file dsl_dataset.c.
static int dsl_snapshot_rename_one | ( | const char * | name, |
void * | arg | ||
) | [static] |
Definition at line 2530 of file dsl_dataset.c.
static int dsl_valid_rename | ( | const char * | oldname, |
void * | arg | ||
) | [static] |
Definition at line 2628 of file dsl_dataset.c.
static void get_clones_stat | ( | dsl_dataset_t * | ds, |
nvlist_t * | nv | ||
) | [static] |
Definition at line 2240 of file dsl_dataset.c.
static int kill_blkptr | ( | spa_t * | spa, |
zilog_t * | zilog, | ||
const blkptr_t * | bp, | ||
arc_buf_t * | pbuf, | ||
const zbookmark_t * | zb, | ||
const dnode_phys_t * | dnp, | ||
void * | arg | ||
) | [static] |
Definition at line 1314 of file dsl_dataset.c.
static int old_synchronous_dataset_destroy | ( | dsl_dataset_t * | ds, |
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 1660 of file dsl_dataset.c.
static int64_t parent_delta | ( | dsl_dataset_t * | ds, |
int64_t | delta | ||
) | [static] |
Figure out how much of this delta should be propogated to the dsl_dir layer.
If there's a refreservation, that space has already been partially accounted for in our ancestors.
Definition at line 78 of file dsl_dataset.c.
Definition at line 1603 of file dsl_dataset.c.
static void process_old_deadlist | ( | dsl_dataset_t * | ds, |
dsl_dataset_t * | ds_prev, | ||
dsl_dataset_t * | ds_next, | ||
boolean_t | after_branch_point, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 1626 of file dsl_dataset.c.
static void remove_from_next_clones | ( | dsl_dataset_t * | ds, |
uint64_t | obj, | ||
dmu_tx_t * | tx | ||
) | [static] |
Definition at line 1536 of file dsl_dataset.c.
static void snaplist_destroy | ( | list_t * | l, |
boolean_t | own | ||
) | [static] |
Definition at line 3078 of file dsl_dataset.c.
static int snaplist_make | ( | dsl_pool_t * | dp, |
boolean_t | own, | ||
uint64_t | first_obj, | ||
uint64_t | last_obj, | ||
list_t * | l | ||
) | [static] |
Make a list of dsl_dataset_t's for the snapshots between first_obj (exclusive) and last_obj (inclusive).
The list will be in reverse order (last_obj will be the list_head()). If first_obj == 0, do all snapshots back to this dataset's origin.
Definition at line 3017 of file dsl_dataset.c.
static int snaplist_space | ( | list_t * | l, |
uint64_t | mintxg, | ||
uint64_t * | spacep | ||
) | [static] |
Definition at line 3063 of file dsl_dataset.c.
static boolean_t snaplist_unstable | ( | list_t * | l | ) | [static] |
dsl_checkfunc_t dsl_dataset_destroy_begin_check [static] |
Definition at line 54 of file dsl_dataset.c.
dsl_syncfunc_t dsl_dataset_destroy_begin_sync [static] |
Definition at line 55 of file dsl_dataset.c.
dsl_syncfunc_t dsl_dataset_set_reservation_sync [static] |
Definition at line 56 of file dsl_dataset.c.
char* dsl_reaper = "the grim reaper" [static] |
Definition at line 52 of file dsl_dataset.c.
char* snaplist_tag = "snaplist" [static] |
Definition at line 3009 of file dsl_dataset.c.