[Devel] [PATCH RHEL9 COMMIT] dm-qcow2: Handle STATUSTYPE_IMA case in dm target status callback

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jun 8 19:36:31 MSK 2022


The commit is pushed to "branch-rh9-5.14.0-70.13.1.vz9.16.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-70.13.1.vz9.16.3
------>
commit 2d65ff6063deb3d358d1034055a0b293f0c24419
Author: Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
Date:   Wed Jun 8 01:14:42 2022 +0300

    dm-qcow2: Handle STATUSTYPE_IMA case in dm target status callback
    
    After ms commit 91ccbbac17 ("dm ima: measure data on table load")
    a new STATUSTYPE_IMA has been 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>
    
    Fixes: 2b0a69ab61fe ("dm-qcow2: Introduce driver to create block devices over
    QCOW2 files")
    Feature: dm-qcow2: block device over QCOW2 files driver
---
 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);
 }


More information about the Devel mailing list