In hostdisk.c::grub_util_fd_open_device, there's a workaround to linux disk cache described below.
"Linux has a bug that the disk cache for a whole disk is not consistent with the one for a partition of the disk." The workaround will result in using the partition device for writing the image of which the address offset is calculated to be within it's range, to avoid the cache problem of the whole disk device. This patch fixed the linux disk cache workaround not being effective for multipath/dm device because its partition device cannot be correctly determined by grub_hostdisk_linux_find_partition function. --- grub-core/osdep/linux/hostdisk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grub-core/osdep/linux/hostdisk.c b/grub-core/osdep/linux/hostdisk.c index 06179fca7..ed530bdc4 100644 --- a/grub-core/osdep/linux/hostdisk.c +++ b/grub-core/osdep/linux/hostdisk.c @@ -263,6 +263,12 @@ grub_hostdisk_linux_find_partition (char *dev, grub_disk_addr_t sector) p = real_dev + len; format = "-part%d"; } + else if (strncmp (real_dev, "/dev/dm-", + sizeof ("/dev/dm-") - 1) == 0) + { + p = real_dev + len - 1; + format = "%d"; + } else if (real_dev[len - 1] >= '0' && real_dev[len - 1] <= '9') { p = real_dev + len; -- 2.13.6 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel