equal
deleted
inserted
replaced
18 * |
18 * |
19 * CDDL HEADER END |
19 * CDDL HEADER END |
20 */ |
20 */ |
21 /* |
21 /* |
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
|
23 * Copyright (c) 2012 by Delphix. All rights reserved. |
23 */ |
24 */ |
24 |
25 |
25 #ifndef _SYS_DSL_POOL_H |
26 #ifndef _SYS_DSL_POOL_H |
26 #define _SYS_DSL_POOL_H |
27 #define _SYS_DSL_POOL_H |
27 |
28 |
32 #include <sys/zio.h> |
33 #include <sys/zio.h> |
33 #include <sys/dnode.h> |
34 #include <sys/dnode.h> |
34 #include <sys/ddt.h> |
35 #include <sys/ddt.h> |
35 #include <sys/arc.h> |
36 #include <sys/arc.h> |
36 #include <sys/bpobj.h> |
37 #include <sys/bpobj.h> |
|
38 #include <sys/bptree.h> |
37 |
39 |
38 #ifdef __cplusplus |
40 #ifdef __cplusplus |
39 extern "C" { |
41 extern "C" { |
40 #endif |
42 #endif |
41 |
43 |
46 struct dmu_tx; |
48 struct dmu_tx; |
47 struct dsl_scan; |
49 struct dsl_scan; |
48 |
50 |
49 /* These macros are for indexing into the zfs_all_blkstats_t. */ |
51 /* These macros are for indexing into the zfs_all_blkstats_t. */ |
50 #define DMU_OT_DEFERRED DMU_OT_NONE |
52 #define DMU_OT_DEFERRED DMU_OT_NONE |
51 #define DMU_OT_TOTAL DMU_OT_NUMTYPES |
53 #define DMU_OT_OTHER DMU_OT_NUMTYPES /* place holder for DMU_OT() types */ |
|
54 #define DMU_OT_TOTAL (DMU_OT_NUMTYPES + 1) |
52 |
55 |
53 typedef struct zfs_blkstat { |
56 typedef struct zfs_blkstat { |
54 uint64_t zb_count; |
57 uint64_t zb_count; |
55 uint64_t zb_asize; |
58 uint64_t zb_asize; |
56 uint64_t zb_lsize; |
59 uint64_t zb_lsize; |
83 hrtime_t dp_read_overhead; |
86 hrtime_t dp_read_overhead; |
84 uint64_t dp_throughput; /* bytes per millisec */ |
87 uint64_t dp_throughput; /* bytes per millisec */ |
85 uint64_t dp_write_limit; |
88 uint64_t dp_write_limit; |
86 uint64_t dp_tmp_userrefs_obj; |
89 uint64_t dp_tmp_userrefs_obj; |
87 bpobj_t dp_free_bpobj; |
90 bpobj_t dp_free_bpobj; |
|
91 uint64_t dp_bptree_obj; |
88 |
92 |
89 struct dsl_scan *dp_scan; |
93 struct dsl_scan *dp_scan; |
90 |
94 |
91 /* Uses dp_lock */ |
95 /* Uses dp_lock */ |
92 kmutex_t dp_lock; |
96 kmutex_t dp_lock; |
108 krwlock_t dp_config_rwlock; |
112 krwlock_t dp_config_rwlock; |
109 |
113 |
110 zfs_all_blkstats_t *dp_blkstats; |
114 zfs_all_blkstats_t *dp_blkstats; |
111 } dsl_pool_t; |
115 } dsl_pool_t; |
112 |
116 |
113 int dsl_pool_open(spa_t *spa, uint64_t txg, dsl_pool_t **dpp); |
117 int dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp); |
|
118 int dsl_pool_open(dsl_pool_t *dp); |
114 void dsl_pool_close(dsl_pool_t *dp); |
119 void dsl_pool_close(dsl_pool_t *dp); |
115 dsl_pool_t *dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64_t txg); |
120 dsl_pool_t *dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64_t txg); |
116 void dsl_pool_sync(dsl_pool_t *dp, uint64_t txg); |
121 void dsl_pool_sync(dsl_pool_t *dp, uint64_t txg); |
117 void dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg); |
122 void dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg); |
118 int dsl_pool_sync_context(dsl_pool_t *dp); |
123 int dsl_pool_sync_context(dsl_pool_t *dp); |