summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-core.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-06-08 08:34:09 +0200
committerMike Snitzer <snitzer@kernel.org>2022-06-29 12:46:06 -0400
commite810cb78bc4b4febeac451a0d823ca68622cd86b (patch)
tree42cefa95e782c4157125cbbe136f6c9a011d0ac0 /drivers/md/dm-core.h
parent4ed045d8756a08dd6b823ffc6867dfc344491909 (diff)
downloadlinux-e810cb78bc4b4febeac451a0d823ca68622cd86b.tar.bz2
dm: refactor dm_md_mempool allocation
The current split between dm_table_alloc_md_mempools and dm_alloc_md_mempools is rather arbitrary, so merge the two into one easy to follow function. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-core.h')
-rw-r--r--drivers/md/dm-core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h
index c954ff91870e..5d9afca0d105 100644
--- a/drivers/md/dm-core.h
+++ b/drivers/md/dm-core.h
@@ -230,6 +230,9 @@ struct dm_target_io {
sector_t old_sector;
struct bio clone;
};
+#define DM_TARGET_IO_BIO_OFFSET (offsetof(struct dm_target_io, clone))
+#define DM_IO_BIO_OFFSET \
+ (offsetof(struct dm_target_io, clone) + offsetof(struct dm_io, tio))
/*
* dm_target_io flags