aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap-transient.c
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2009-04-02 14:55:30 -0400
committerAlasdair G Kergon <agk@redhat.com>2009-04-02 14:55:30 -0400
commitb2a114652940ccf7e9668ad447ca78bf16a31139 (patch)
treef86e851ff752a8ae5ce1b5571cde1918c86a156a /drivers/md/dm-snap-transient.c
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-snap-transient.c')
-rw-r--r--drivers/md/dm-snap-transient.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/dm-snap-transient.c b/drivers/md/dm-snap-transient.c
index 7f6e2e6dcb0d..b558176ff020 100644
--- a/drivers/md/dm-snap-transient.c
+++ b/drivers/md/dm-snap-transient.c
@@ -39,7 +39,7 @@ static int transient_read_metadata(struct dm_exception_store *store,
39static int transient_prepare_exception(struct dm_exception_store *store, 39static int transient_prepare_exception(struct dm_exception_store *store,
40 struct dm_snap_exception *e) 40 struct dm_snap_exception *e)
41{ 41{
42 struct transient_c *tc = (struct transient_c *) store->context; 42 struct transient_c *tc = store->context;
43 sector_t size = get_dev_size(store->snap->cow->bdev); 43 sector_t size = get_dev_size(store->snap->cow->bdev);
44 44
45 if (size < (tc->next_free + store->snap->chunk_size)) 45 if (size < (tc->next_free + store->snap->chunk_size))
@@ -71,12 +71,12 @@ int dm_create_transient(struct dm_exception_store *store)
71{ 71{
72 struct transient_c *tc; 72 struct transient_c *tc;
73 73
74 store->destroy = transient_destroy; 74 store->type.dtr = transient_destroy;
75 store->read_metadata = transient_read_metadata; 75 store->type.read_metadata = transient_read_metadata;
76 store->prepare_exception = transient_prepare_exception; 76 store->type.prepare_exception = transient_prepare_exception;
77 store->commit_exception = transient_commit_exception; 77 store->type.commit_exception = transient_commit_exception;
78 store->drop_snapshot = NULL; 78 store->type.drop_snapshot = NULL;
79 store->fraction_full = transient_fraction_full; 79 store->type.fraction_full = transient_fraction_full;
80 80
81 tc = kmalloc(sizeof(struct transient_c), GFP_KERNEL); 81 tc = kmalloc(sizeof(struct transient_c), GFP_KERNEL);
82 if (!tc) 82 if (!tc)