93
94 struct dsl_scan *dp_scan;
95
96 /* Uses dp_lock */
97 kmutex_t dp_lock;
98 uint64_t dp_space_towrite[TXG_SIZE];
99 uint64_t dp_tempreserved[TXG_SIZE];
100 uint64_t dp_mos_used_delta;
101 uint64_t dp_mos_compressed_delta;
102 uint64_t dp_mos_uncompressed_delta;
103
104 /* Has its own locking */
105 tx_state_t dp_tx;
106 txg_list_t dp_dirty_datasets;
107 txg_list_t dp_dirty_zilogs;
108 txg_list_t dp_dirty_dirs;
109 txg_list_t dp_sync_tasks;
110
111 /*
112 * Protects administrative changes (properties, namespace)
113 * It is only held for write in syncing context. Therefore
114 * syncing context does not need to ever have it for read, since
115 * nobody else could possibly have it for write.
116 */
117 rrwlock_t dp_config_rwlock;
118
119 zfs_all_blkstats_t *dp_blkstats;
120 } dsl_pool_t;
121
122 int dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp);
123 int dsl_pool_open(dsl_pool_t *dp);
124 void dsl_pool_close(dsl_pool_t *dp);
125 dsl_pool_t *dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64_t txg);
126 void dsl_pool_sync(dsl_pool_t *dp, uint64_t txg);
127 void dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg);
128 int dsl_pool_sync_context(dsl_pool_t *dp);
129 uint64_t dsl_pool_adjustedsize(dsl_pool_t *dp, boolean_t netfree);
130 uint64_t dsl_pool_adjustedfree(dsl_pool_t *dp, boolean_t netfree);
131 int dsl_pool_tempreserve_space(dsl_pool_t *dp, uint64_t space, dmu_tx_t *tx);
132 void dsl_pool_tempreserve_clear(dsl_pool_t *dp, int64_t space, dmu_tx_t *tx);
|
93
94 struct dsl_scan *dp_scan;
95
96 /* Uses dp_lock */
97 kmutex_t dp_lock;
98 uint64_t dp_space_towrite[TXG_SIZE];
99 uint64_t dp_tempreserved[TXG_SIZE];
100 uint64_t dp_mos_used_delta;
101 uint64_t dp_mos_compressed_delta;
102 uint64_t dp_mos_uncompressed_delta;
103
104 /* Has its own locking */
105 tx_state_t dp_tx;
106 txg_list_t dp_dirty_datasets;
107 txg_list_t dp_dirty_zilogs;
108 txg_list_t dp_dirty_dirs;
109 txg_list_t dp_sync_tasks;
110
111 /*
112 * Protects administrative changes (properties, namespace)
113 *
114 * It is only held for write in syncing context. Therefore
115 * syncing context does not need to ever have it for read, since
116 * nobody else could possibly have it for write.
117 */
118 rrwlock_t dp_config_rwlock;
119
120 zfs_all_blkstats_t *dp_blkstats;
121 } dsl_pool_t;
122
123 int dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp);
124 int dsl_pool_open(dsl_pool_t *dp);
125 void dsl_pool_close(dsl_pool_t *dp);
126 dsl_pool_t *dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64_t txg);
127 void dsl_pool_sync(dsl_pool_t *dp, uint64_t txg);
128 void dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg);
129 int dsl_pool_sync_context(dsl_pool_t *dp);
130 uint64_t dsl_pool_adjustedsize(dsl_pool_t *dp, boolean_t netfree);
131 uint64_t dsl_pool_adjustedfree(dsl_pool_t *dp, boolean_t netfree);
132 int dsl_pool_tempreserve_space(dsl_pool_t *dp, uint64_t space, dmu_tx_t *tx);
133 void dsl_pool_tempreserve_clear(dsl_pool_t *dp, int64_t space, dmu_tx_t *tx);
|