summaryrefslogtreecommitdiff
path: root/drivers/md/dm-cache-block-types.h
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2014-11-07 14:47:07 +0000
committerMike Snitzer <snitzer@redhat.com>2014-11-10 15:25:30 -0500
commit1bad9bc4ee899a108499e5eac6baafff018b4d0b (patch)
tree32eb64e78c6d68b65c29b9462bb264c3c69cdf8f /drivers/md/dm-cache-block-types.h
parent5f274d886598c9fd26d2499bf3f68306f170e9db (diff)
dm cache: revert "remove remainder of distinct discard block size"
This reverts commit 64ab346a360a4b15c28fb8531918d4a01f4eabd9 because we actually do want to allow the discard blocksize to be larger than the cache blocksize. Further dm-cache discard changes will make this possible. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-block-types.h')
-rw-r--r--drivers/md/dm-cache-block-types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-block-types.h b/drivers/md/dm-cache-block-types.h
index aac0e2df06be..bed4ad4e1b7c 100644
--- a/drivers/md/dm-cache-block-types.h
+++ b/drivers/md/dm-cache-block-types.h
@@ -19,6 +19,7 @@
typedef dm_block_t __bitwise__ dm_oblock_t;
typedef uint32_t __bitwise__ dm_cblock_t;
+typedef dm_block_t __bitwise__ dm_dblock_t;
static inline dm_oblock_t to_oblock(dm_block_t b)
{
@@ -40,4 +41,14 @@ static inline uint32_t from_cblock(dm_cblock_t b)
return (__force uint32_t) b;
}
+static inline dm_dblock_t to_dblock(dm_block_t b)
+{
+ return (__force dm_dblock_t) b;
+}
+
+static inline dm_block_t from_dblock(dm_dblock_t b)
+{
+ return (__force dm_block_t) b;
+}
+
#endif /* DM_CACHE_BLOCK_TYPES_H */