diff options
author | Jonathan Brassow <jbrassow@redhat.com> | 2009-04-02 14:55:30 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-04-02 14:55:30 -0400 |
commit | b2a114652940ccf7e9668ad447ca78bf16a31139 (patch) | |
tree | f86e851ff752a8ae5ce1b5571cde1918c86a156a /drivers/md/dm-exception-store.h | |
parent | ec44ab9d6681ddf9026b593e866bec9c0e075e1d (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.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/md/dm-exception-store.h b/drivers/md/dm-exception-store.h index bb9f33d5daa2..aed1f1172f9e 100644 --- a/drivers/md/dm-exception-store.h +++ b/drivers/md/dm-exception-store.h | |||
@@ -37,11 +37,15 @@ struct dm_snap_exception { | |||
37 | * Abstraction to handle the meta/layout of exception stores (the | 37 | * Abstraction to handle the meta/layout of exception stores (the |
38 | * COW device). | 38 | * COW device). |
39 | */ | 39 | */ |
40 | struct dm_exception_store { | 40 | struct dm_exception_store; |
41 | struct dm_exception_store_type { | ||
42 | int (*ctr) (struct dm_exception_store *store, | ||
43 | unsigned argc, char **argv); | ||
44 | |||
41 | /* | 45 | /* |
42 | * Destroys this object when you've finished with it. | 46 | * Destroys this object when you've finished with it. |
43 | */ | 47 | */ |
44 | void (*destroy) (struct dm_exception_store *store); | 48 | void (*dtr) (struct dm_exception_store *store); |
45 | 49 | ||
46 | /* | 50 | /* |
47 | * The target shouldn't read the COW device until this is | 51 | * The target shouldn't read the COW device until this is |
@@ -81,8 +85,13 @@ struct dm_exception_store { | |||
81 | void (*fraction_full) (struct dm_exception_store *store, | 85 | void (*fraction_full) (struct dm_exception_store *store, |
82 | sector_t *numerator, | 86 | sector_t *numerator, |
83 | sector_t *denominator); | 87 | sector_t *denominator); |
88 | }; | ||
89 | |||
90 | struct dm_exception_store { | ||
91 | struct dm_exception_store_type type; | ||
84 | 92 | ||
85 | struct dm_snapshot *snap; | 93 | struct dm_snapshot *snap; |
94 | |||
86 | void *context; | 95 | void *context; |
87 | }; | 96 | }; |
88 | 97 | ||