Quoting Bean <[EMAIL PROTECTED]>:

After more thoughts, I think the current method still have problem.
grub_disk_read reads up to 8192 bytes at a time, which can be larger
than the block size.

But we never ask grub_disk_read() to read across the block boundary in grub_fshelp_read(). The code takes care of it. I assume grub_disk_read() would not write more than requested to the buffer.

Unless all or none of the sectors in the same
block is mapped, we end up reading the wrong sector. So we need to do
the mapping inside grub_disk_read.

But mapping is done for blocks, not for sectors. grub_fshelp_map_block() clearly assumes that for every filesystem.

--
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to