integritysetup format command removes underlying dm device
[root@frawhide ~]# dmsetup create dmlin --table "0 10000 linear /dev/sdx 0"
[root@frawhide ~]# integritysetup format /dev/mapper/dmlin --integrity crc32 --tag-size 32 --journal-crypt-key-size 32 --journal-crypt ctr-aes --journal-crypt-key-file /tmp/keys
Formatted with tag size 32, internal integrity crc32.
Wiping device to initialize integrity checksum.
You can interrupt this by pressing CTRL+c (rest of not wiped device will contain invalid checksum).
Finished, time 00:00.034, 3 MiB written, speed 86,7 MiB/s
[root@frawhide ~]# dmsetup status dmlin
Device does not exist.
Command failed
Similar bug can be observed after integritysetup close command on active dm-integrity device. It removes underlying dm dev as well.