diff options
Diffstat (limited to 'drivers/md/dm-snap-transient.c')
-rw-r--r-- | drivers/md/dm-snap-transient.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/dm-snap-transient.c b/drivers/md/dm-snap-transient.c index 245a50c7337e..a0898a66a2f8 100644 --- a/drivers/md/dm-snap-transient.c +++ b/drivers/md/dm-snap-transient.c | |||
@@ -39,7 +39,7 @@ static int transient_prepare_exception(struct dm_exception_store *store, | |||
39 | struct dm_exception *e) | 39 | struct dm_exception *e) |
40 | { | 40 | { |
41 | struct transient_c *tc = store->context; | 41 | struct transient_c *tc = store->context; |
42 | sector_t size = get_dev_size(store->cow->bdev); | 42 | sector_t size = get_dev_size(dm_snap_cow(store->snap)->bdev); |
43 | 43 | ||
44 | if (size < (tc->next_free + store->chunk_size)) | 44 | if (size < (tc->next_free + store->chunk_size)) |
45 | return -1; | 45 | return -1; |
@@ -65,7 +65,7 @@ static void transient_usage(struct dm_exception_store *store, | |||
65 | sector_t *metadata_sectors) | 65 | sector_t *metadata_sectors) |
66 | { | 66 | { |
67 | *sectors_allocated = ((struct transient_c *) store->context)->next_free; | 67 | *sectors_allocated = ((struct transient_c *) store->context)->next_free; |
68 | *total_sectors = get_dev_size(store->cow->bdev); | 68 | *total_sectors = get_dev_size(dm_snap_cow(store->snap)->bdev); |
69 | *metadata_sectors = 0; | 69 | *metadata_sectors = 0; |
70 | } | 70 | } |
71 | 71 | ||
@@ -94,8 +94,7 @@ static unsigned transient_status(struct dm_exception_store *store, | |||
94 | case STATUSTYPE_INFO: | 94 | case STATUSTYPE_INFO: |
95 | break; | 95 | break; |
96 | case STATUSTYPE_TABLE: | 96 | case STATUSTYPE_TABLE: |
97 | DMEMIT(" %s N %llu", store->cow->name, | 97 | DMEMIT(" N %llu", (unsigned long long)store->chunk_size); |
98 | (unsigned long long)store->chunk_size); | ||
99 | } | 98 | } |
100 | 99 | ||
101 | return sz; | 100 | return sz; |