diff options
Diffstat (limited to 'drivers/md/dm-exception-store.c')
| -rw-r--r-- | drivers/md/dm-exception-store.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c index 5bbce29f143a..41f408068a7c 100644 --- a/drivers/md/dm-exception-store.c +++ b/drivers/md/dm-exception-store.c | |||
| @@ -9,13 +9,13 @@ | |||
| 9 | 9 | ||
| 10 | #include "dm.h" | 10 | #include "dm.h" |
| 11 | #include "dm-snap.h" | 11 | #include "dm-snap.h" |
| 12 | #include "dm-io.h" | ||
| 13 | #include "kcopyd.h" | ||
| 14 | 12 | ||
| 15 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
| 16 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
| 17 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
| 18 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 17 | #include <linux/dm-io.h> | ||
| 18 | #include <linux/dm-kcopyd.h> | ||
| 19 | 19 | ||
| 20 | #define DM_MSG_PREFIX "snapshots" | 20 | #define DM_MSG_PREFIX "snapshots" |
| 21 | #define DM_CHUNK_SIZE_DEFAULT_SECTORS 32 /* 16KB */ | 21 | #define DM_CHUNK_SIZE_DEFAULT_SECTORS 32 /* 16KB */ |
| @@ -131,7 +131,7 @@ struct pstore { | |||
| 131 | 131 | ||
| 132 | static unsigned sectors_to_pages(unsigned sectors) | 132 | static unsigned sectors_to_pages(unsigned sectors) |
| 133 | { | 133 | { |
| 134 | return sectors / (PAGE_SIZE >> 9); | 134 | return DIV_ROUND_UP(sectors, PAGE_SIZE >> 9); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static int alloc_area(struct pstore *ps) | 137 | static int alloc_area(struct pstore *ps) |
| @@ -159,7 +159,7 @@ static void free_area(struct pstore *ps) | |||
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | struct mdata_req { | 161 | struct mdata_req { |
| 162 | struct io_region *where; | 162 | struct dm_io_region *where; |
| 163 | struct dm_io_request *io_req; | 163 | struct dm_io_request *io_req; |
| 164 | struct work_struct work; | 164 | struct work_struct work; |
| 165 | int result; | 165 | int result; |
| @@ -177,7 +177,7 @@ static void do_metadata(struct work_struct *work) | |||
| 177 | */ | 177 | */ |
| 178 | static int chunk_io(struct pstore *ps, uint32_t chunk, int rw, int metadata) | 178 | static int chunk_io(struct pstore *ps, uint32_t chunk, int rw, int metadata) |
| 179 | { | 179 | { |
| 180 | struct io_region where = { | 180 | struct dm_io_region where = { |
| 181 | .bdev = ps->snap->cow->bdev, | 181 | .bdev = ps->snap->cow->bdev, |
| 182 | .sector = ps->snap->chunk_size * chunk, | 182 | .sector = ps->snap->chunk_size * chunk, |
| 183 | .count = ps->snap->chunk_size, | 183 | .count = ps->snap->chunk_size, |
