aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap-persistent.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-snap-persistent.c')
-rw-r--r--drivers/md/dm-snap-persistent.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c
index c3c58159b6e8..505afac9976f 100644
--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -189,7 +189,7 @@ static void do_metadata(struct work_struct *work)
189static int chunk_io(struct pstore *ps, chunk_t chunk, int rw, int metadata) 189static int chunk_io(struct pstore *ps, chunk_t chunk, int rw, int metadata)
190{ 190{
191 struct dm_io_region where = { 191 struct dm_io_region where = {
192 .bdev = ps->snap->cow->bdev, 192 .bdev = ps->snap->store->cow->bdev,
193 .sector = ps->snap->store->chunk_size * chunk, 193 .sector = ps->snap->store->chunk_size * chunk,
194 .count = ps->snap->store->chunk_size, 194 .count = ps->snap->store->chunk_size,
195 }; 195 };
@@ -253,7 +253,7 @@ static void zero_memory_area(struct pstore *ps)
253static int zero_disk_area(struct pstore *ps, chunk_t area) 253static int zero_disk_area(struct pstore *ps, chunk_t area)
254{ 254{
255 struct dm_io_region where = { 255 struct dm_io_region where = {
256 .bdev = ps->snap->cow->bdev, 256 .bdev = ps->snap->store->cow->bdev,
257 .sector = ps->snap->store->chunk_size * area_location(ps, area), 257 .sector = ps->snap->store->chunk_size * area_location(ps, area),
258 .count = ps->snap->store->chunk_size, 258 .count = ps->snap->store->chunk_size,
259 }; 259 };
@@ -280,7 +280,7 @@ static int read_header(struct pstore *ps, int *new_snapshot)
280 */ 280 */
281 if (!ps->snap->store->chunk_size) { 281 if (!ps->snap->store->chunk_size) {
282 ps->snap->store->chunk_size = max(DM_CHUNK_SIZE_DEFAULT_SECTORS, 282 ps->snap->store->chunk_size = max(DM_CHUNK_SIZE_DEFAULT_SECTORS,
283 bdev_hardsect_size(ps->snap->cow->bdev) >> 9); 283 bdev_hardsect_size(ps->snap->store->cow->bdev) >> 9);
284 ps->snap->store->chunk_mask = ps->snap->store->chunk_size - 1; 284 ps->snap->store->chunk_mask = ps->snap->store->chunk_size - 1;
285 ps->snap->store->chunk_shift = ffs(ps->snap->store->chunk_size) 285 ps->snap->store->chunk_shift = ffs(ps->snap->store->chunk_size)
286 - 1; 286 - 1;
@@ -476,7 +476,7 @@ static void persistent_fraction_full(struct dm_exception_store *store,
476 sector_t *numerator, sector_t *denominator) 476 sector_t *numerator, sector_t *denominator)
477{ 477{
478 *numerator = get_info(store)->next_free * store->chunk_size; 478 *numerator = get_info(store)->next_free * store->chunk_size;
479 *denominator = get_dev_size(store->snap->cow->bdev); 479 *denominator = get_dev_size(store->cow->bdev);
480} 480}
481 481
482static void persistent_dtr(struct dm_exception_store *store) 482static void persistent_dtr(struct dm_exception_store *store)
@@ -565,7 +565,7 @@ static int persistent_prepare_exception(struct dm_exception_store *store,
565 struct pstore *ps = get_info(store); 565 struct pstore *ps = get_info(store);
566 uint32_t stride; 566 uint32_t stride;
567 chunk_t next_free; 567 chunk_t next_free;
568 sector_t size = get_dev_size(store->snap->cow->bdev); 568 sector_t size = get_dev_size(store->cow->bdev);
569 569
570 /* Is there enough room ? */ 570 /* Is there enough room ? */
571 if (size < ((ps->next_free + 1) * store->chunk_size)) 571 if (size < ((ps->next_free + 1) * store->chunk_size))