On Wed, 21 Jul 2021 at 22:40, Mikulas Patocka <mpatocka@redhat.com> wrote:
Try to set up dm-verity with block size 512 bytes.
I don't know what block size does squashfs use, but if the filesystem block size is smaller than dm-verity block size, it doesn't work.
Okay thank you so much for this clue, It seems we are using 65536 as the squashfs block size:
65536 is the compression block size - it is unrelated to I/O block size.
There's a config option SQUASHFS_4K_DEVBLK_SIZE. The documentation says that it uses by default 1K block size and if you enable this option, it uses 4K block size.
Okay it seems this config is set in our case: CONFIG_SQUASHFS_4K_DEVBLK_SIZE=y So, with this the squashfs and dm-verity block size exactly matches (4K)
So, try to set it. Or try to reduce dm-verity block size down to 1K.
Okay we are trying this. Thank you so much!! Regards, Pintu