aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-exception-store.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-exception-store.h')
-rw-r--r--drivers/md/dm-exception-store.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/md/dm-exception-store.h b/drivers/md/dm-exception-store.h
index aed1f1172f9e..31377150080e 100644
--- a/drivers/md/dm-exception-store.h
+++ b/drivers/md/dm-exception-store.h
@@ -39,6 +39,9 @@ struct dm_snap_exception {
39 */ 39 */
40struct dm_exception_store; 40struct dm_exception_store;
41struct dm_exception_store_type { 41struct dm_exception_store_type {
42 const char *name;
43 struct module *module;
44
42 int (*ctr) (struct dm_exception_store *store, 45 int (*ctr) (struct dm_exception_store *store,
43 unsigned argc, char **argv); 46 unsigned argc, char **argv);
44 47
@@ -85,10 +88,13 @@ struct dm_exception_store_type {
85 void (*fraction_full) (struct dm_exception_store *store, 88 void (*fraction_full) (struct dm_exception_store *store,
86 sector_t *numerator, 89 sector_t *numerator,
87 sector_t *denominator); 90 sector_t *denominator);
91
92 /* For internal device-mapper use only. */
93 struct list_head list;
88}; 94};
89 95
90struct dm_exception_store { 96struct dm_exception_store {
91 struct dm_exception_store_type type; 97 struct dm_exception_store_type *type;
92 98
93 struct dm_snapshot *snap; 99 struct dm_snapshot *snap;
94 100
@@ -138,6 +144,13 @@ static inline void dm_consecutive_chunk_count_inc(struct dm_snap_exception *e)
138 144
139# endif 145# endif
140 146
147int dm_exception_store_type_register(struct dm_exception_store_type *type);
148int dm_exception_store_type_unregister(struct dm_exception_store_type *type);
149
150int dm_exception_store_create(const char *type_name,
151 struct dm_exception_store **store);
152void dm_exception_store_destroy(struct dm_exception_store *store);
153
141int dm_exception_store_init(void); 154int dm_exception_store_init(void);
142void dm_exception_store_exit(void); 155void dm_exception_store_exit(void);
143 156
@@ -150,8 +163,4 @@ void dm_persistent_snapshot_exit(void);
150int dm_transient_snapshot_init(void); 163int dm_transient_snapshot_init(void);
151void dm_transient_snapshot_exit(void); 164void dm_transient_snapshot_exit(void);
152 165
153int dm_create_persistent(struct dm_exception_store *store);
154
155int dm_create_transient(struct dm_exception_store *store);
156
157#endif /* _LINUX_DM_EXCEPTION_STORE */ 166#endif /* _LINUX_DM_EXCEPTION_STORE */