Blob Blame History Raw
From bd4a6dd241ae0a0bf36274d61e1a1fbf80b99ecb Mon Sep 17 00:00:00 2001
From: Mike Snitzer <snitzer@kernel.org>
Date: Sat, 19 Mar 2022 18:29:50 -0400
Subject: [PATCH] dm: reduce size of dm_io and dm_target_io structs
Git-commit: bd4a6dd241ae0a0bf36274d61e1a1fbf80b99ecb
Patch-mainline: v5.18-rc1
References: jsc#PED-2765

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Coly Li <colyli@suse.de>

---
 drivers/md/dm-core.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h
index feb53232d777..f186d7afaeab 100644
--- a/drivers/md/dm-core.h
+++ b/drivers/md/dm-core.h
@@ -208,14 +208,14 @@ struct dm_table {
 /*
  * One of these is allocated per clone bio.
  */
-#define DM_TIO_MAGIC 7282014
+#define DM_TIO_MAGIC 28714
 struct dm_target_io {
-	unsigned int magic;
+	unsigned short magic;
+	unsigned short flags;
 	unsigned int target_bio_nr;
 	struct dm_io *io;
 	struct dm_target *ti;
 	unsigned int *len_ptr;
-	unsigned short flags;
 	sector_t old_sector;
 	struct bio clone;
 };
@@ -242,14 +242,14 @@ static inline void dm_tio_set_flag(struct dm_target_io *tio, unsigned int bit)
  * One of these is allocated per original bio.
  * It contains the first clone used for that original.
  */
-#define DM_IO_MAGIC 5191977
+#define DM_IO_MAGIC 19577
 struct dm_io {
-	unsigned int magic;
+	unsigned short magic;
+	unsigned short flags;
 	atomic_t io_count;
 	struct mapped_device *md;
 	struct bio *orig_bio;
 	blk_status_t status;
-	unsigned short flags;
 	unsigned long start_time;
 	void *data;
 	struct hlist_node node;
-- 
2.35.3