]> git.proxmox.com Git - grub2.git/commit - ChangeLog-2015
Speed up consecutive hostdisk operations on the same device.
authorColin Watson <cjwatson@ubuntu.com>
Sun, 14 Mar 2010 15:39:14 +0000 (15:39 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Sun, 14 Mar 2010 15:39:14 +0000 (15:39 +0000)
commit08e46ededac18339abe90193ac91b3e908d90a09
treee292f8a3a7a402028e0b13496fcf290d52672d6c
parent4a6d2d06dbf62e37389a8d8488e874fbc48f0920
parentc6293875f961046e9d961db56fbf6082a5d955cc
Speed up consecutive hostdisk operations on the same device.

* util/hostdisk.c (struct grub_util_biosdisk_data): New structure.
(grub_util_biosdisk_open): Initialise disk->data.
(struct linux_partition_cache): New structure.
(linux_find_partition): Cache partition start positions; these are
expensive to compute on every read and write.
(open_device): Cache open file descriptor in disk->data, so that we
don't have to reopen it and flush the buffer cache for consecutive
operations on the same device.
(grub_util_biosdisk_close): New function.
(grub_util_biosdisk_dev): Set `close' member.

* conf/common.rmk (grub_probe_SOURCES): Add kern/list.c.
* conf/i386-efi.rmk (grub_setup_SOURCES): Likewise.
* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
* conf/sparc64-ieee1275.rmk (grub_setup_SOURCES): Likewise.
* conf/x86_64-efi.rmk (grub_setup_SOURCES): Likewise.
ChangeLog
conf/sparc64-ieee1275.rmk
util/hostdisk.c