aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-snap.h')
-rw-r--r--drivers/md/dm-snap.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/md/dm-snap.h b/drivers/md/dm-snap.h
index 93cd8ee8997f..c2e4ebedbd49 100644
--- a/drivers/md/dm-snap.h
+++ b/drivers/md/dm-snap.h
@@ -32,11 +32,6 @@ struct dm_snapshot {
32 /* List of snapshots per Origin */ 32 /* List of snapshots per Origin */
33 struct list_head list; 33 struct list_head list;
34 34
35 /* Size of data blocks saved - must be a power of 2 */
36 chunk_t chunk_size;
37 chunk_t chunk_mask;
38 chunk_t chunk_shift;
39
40 /* You can't use a snapshot if this is 0 (e.g. if full) */ 35 /* You can't use a snapshot if this is 0 (e.g. if full) */
41 int valid; 36 int valid;
42 37
@@ -84,12 +79,12 @@ static inline sector_t get_dev_size(struct block_device *bdev)
84 79
85static inline chunk_t sector_to_chunk(struct dm_snapshot *s, sector_t sector) 80static inline chunk_t sector_to_chunk(struct dm_snapshot *s, sector_t sector)
86{ 81{
87 return (sector & ~s->chunk_mask) >> s->chunk_shift; 82 return (sector & ~s->store->chunk_mask) >> s->store->chunk_shift;
88} 83}
89 84
90static inline sector_t chunk_to_sector(struct dm_snapshot *s, chunk_t chunk) 85static inline sector_t chunk_to_sector(struct dm_snapshot *s, chunk_t chunk)
91{ 86{
92 return chunk << s->chunk_shift; 87 return chunk << s->store->chunk_shift;
93} 88}
94 89
95static inline int bdev_equal(struct block_device *lhs, struct block_device *rhs) 90static inline int bdev_equal(struct block_device *lhs, struct block_device *rhs)