[Devel] [PATCH 1/2] dm-qcow2: handle STATUSTYPE_IMA case in dm target status callback

Alexander Mikhalitsyn alexander.mikhalitsyn at virtuozzo.com
Wed Jun 8 01:14:42 MSK 2022


After 91ccbbac17 ("dm ima: measure data on table load") a new STATUSTYPE_IMA was introduced.
In our case it's fully safe just to return empty data for IMA. We have no any usecases
for it at least now.

https://jira.sw.ru/browse/PSBM-140279

Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
---
 drivers/md/dm-qcow2-target.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/md/dm-qcow2-target.c b/drivers/md/dm-qcow2-target.c
index 0322ac294b17..9a6f970343ec 100644
--- a/drivers/md/dm-qcow2-target.c
+++ b/drivers/md/dm-qcow2-target.c
@@ -902,6 +902,9 @@ static void qcow2_status(struct dm_target *ti, status_type_t type,
 		DMEMIT("%u v%u %llu", qcow2->img_id + 1, hdr->version,
 				      to_sector(qcow2->clu_size));
 		break;
+	case STATUSTYPE_IMA:
+		result[0] = '\0';
+		break;
 	}
 	qcow2_ref_dec(tgt, ref_index);
 }
-- 
2.36.1



More information about the Devel mailing list