aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm-exception-store.h
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2009-04-02 19:55:30 +0100
committerAlasdair G Kergon <agk@redhat.com>2009-04-02 19:55:30 +0100
commitb2a114652940ccf7e9668ad447ca78bf16a31139 (patch)
treef86e851ff752a8ae5ce1b5571cde1918c86a156a /drivers/md/dm-exception-store.h
parentec44ab9d6681ddf9026b593e866bec9c0e075e1d (diff)
dm exception store: separate type from instance
Introduce struct dm_exception_store_type. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-exception-store.h')
-rw-r--r--drivers/md/dm-exception-store.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/md/dm-exception-store.h b/drivers/md/dm-exception-store.h
index bb9f33d5daa..aed1f1172f9 100644
--- a/drivers/md/dm-exception-store.h
+++ b/drivers/md/dm-exception-store.h
@@ -37,11 +37,15 @@ struct dm_snap_exception {
* Abstraction to handle the meta/layout of exception stores (the
* COW device).
*/
-struct dm_exception_store {
+struct dm_exception_store;
+struct dm_exception_store_type {
+ int (*ctr) (struct dm_exception_store *store,
+ unsigned argc, char **argv);
+
/*
* Destroys this object when you've finished with it.
*/
- void (*destroy) (struct dm_exception_store *store);
+ void (*dtr) (struct dm_exception_store *store);
/*
* The target shouldn't read the COW device until this is
@@ -81,8 +85,13 @@ struct dm_exception_store {
void (*fraction_full) (struct dm_exception_store *store,
sector_t *numerator,
sector_t *denominator);
+};
+
+struct dm_exception_store {
+ struct dm_exception_store_type type;
struct dm_snapshot *snap;
+
void *context;
};