aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm-snap.h
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2009-04-02 19:55:33 +0100
committerAlasdair G Kergon <agk@redhat.com>2009-04-02 19:55:33 +0100
commit71fab00a6bef7fb53119271a8abdbaf40970d28a (patch)
tree4881f8f6d1b1c42528889d7a56fb8674d2aa7723 /drivers/md/dm-snap.h
parent49beb2b87a972a994ff77633234ca3bf0d30a1d8 (diff)
dm snapshot: remove dm_snap header use
Move useful functions out of dm-snap.h and stop using dm-snap.h. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-snap.h')
-rw-r--r--drivers/md/dm-snap.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/md/dm-snap.h b/drivers/md/dm-snap.h
index c8a486e0ea2..4f61bc4c14f 100644
--- a/drivers/md/dm-snap.h
+++ b/drivers/md/dm-snap.h
@@ -68,22 +68,10 @@ struct dm_snapshot {
struct hlist_head tracked_chunk_hash[DM_TRACKED_CHUNK_HASH_SIZE];
};
-/*
- * Return the number of sectors in the device.
- */
-static inline sector_t get_dev_size(struct block_device *bdev)
-{
- return bdev->bd_inode->i_size >> SECTOR_SHIFT;
-}
-
-static inline chunk_t sector_to_chunk(struct dm_snapshot *s, sector_t sector)
-{
- return (sector & ~s->store->chunk_mask) >> s->store->chunk_shift;
-}
-
-static inline sector_t chunk_to_sector(struct dm_snapshot *s, chunk_t chunk)
+static inline sector_t chunk_to_sector(struct dm_exception_store *store,
+ chunk_t chunk)
{
- return chunk << s->store->chunk_shift;
+ return chunk << store->chunk_shift;
}
static inline int bdev_equal(struct block_device *lhs, struct block_device *rhs)