dm-verity corruption after slot switching Android 11

I tried to create a service for slot switching in android 11.I have used the api from Bootctrl HAL to check the other slot availability and valid image in it.I have updated both the slots a and b with same image, then the service was successfully switched between different slots.With different images in slot a and slot b it is failing.After the slot switching, getting dm verity corruption and log is as below

[ 4.383505] device-mapper: verity: sha1 using implementation "sha1-ce"
[ 4.394599] device-mapper: verity-fec: 252:0: FEC: recursion too deep
[ 4.401091] device-mapper: verity: 252:0: metadata block 542471 is corrupted
[ 4.408301] kvm: exiting hardware virtualization

Device is continuously rebooting after slot update.Could anyone please help me to resolve this?