Glenn Washburn <developm...@efficientek.com> writes: > Its not clear to me, did you test a LUKS2 device with sector size 4096 > with this change? I believe DM does use 512-byte sectors internally, > but it can create block devices that report and use other sector sizes. > You can verfiy this by creating a 4096 sector size LUKS2 devices, open > it with cryptsetup, and then run "blockdev --getbsz /dev/mapper/<dm name>".
You're right, blockdev does indeed report 4096. Here is an updated patch that parses the optional sector_size argument from the DM parameters, I have checked that it does indeed set the right log_sector_size. I think it worked without it because you can technically just read with a lower sector size, but better be safe than sorry! Josselin Poiret (2): devmapper/getroot: Have devmapper recognize LUKS2 devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters grub-core/osdep/devmapper/getroot.c | 107 ++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 5 deletions(-) -- 2.34.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel