1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
use BlockPtr;
use FromBytes;
//------------------------------------------------------------------------------------------------//
// struct DslDataset {
// dmu_buf_user_t ds_dbu,
//
// Immutable:
// dsl_dir *ds_dir,
// dmu_buf_t *ds_dbuf,
// object: u64,
// fsid_guid: u64,
// is_snapshot: bool,
//
// only used in syncing context, only valid for non-snapshots:
// dsl_dataset *ds_prev,
// bookmarks: u64, // DMU_OTN_ZAP_METADATA
// large_blocks: bool,
// need_large_blocks: bool,
//
// has internal locking:
// dsl_deadlist_t ds_deadlist,
// bplist_t ds_pending_deadlist,
//
// protected by lock on pool's dp_dirty_datasets list
// txg_node_t ds_dirty_link,
// list_node_t ds_synced_link,
//
// ds_phys->ds_<accounting> is also protected by ds_lock.
// Protected by ds_lock:
// kmutex_t ds_lock,
// objset_t *ds_objset,
// ds_userrefs: u64,
// void *ds_owner,
//
// Long holds prevent the ds from being destroyed, they allow the
// ds to remain held even after dropping the dp_config_rwlock.
// Owning counts as a long hold. See the comments above
// dsl_pool_hold() for details.
// refcount_t ds_longholds,
//
// no locking, only for making guesses
// ds_trysnap_txg: u64,
//
// for objset_open()
// kmutex_t ds_opening_lock,
//
// ds_reserved: u64, // cached refreservation
// ds_quota: u64, // cached refquota
//
// kmutex_t ds_sendstream_lock,
// list_t ds_sendstreams,
//
// Protected by ds_lock, keep at end of struct for better locality
// char ds_snapname[MAXNAMELEN],
// }