]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Support non-512B sectors and agglomerate reads.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 14:45:52 +0000 (16:45 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 14:45:52 +0000 (16:45 +0200)
* Makefile.util.def (libgrubmods.a): Add grub-core/commands/testload.c.
* grub-core/disk/efi/efidisk.c (grub_efidisk_data): Remove disk_io.
(disk_io_guid): Removed.
(make_devices): Locate solely by BlockIO.
(grub_efidisk_open): Fill log_sector_size and total_sectors.
(grub_efidisk_read): Use read_blocks.
(grub_efidisk_write): Use write_blocks.
* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Fill
log_sector_size.
(get_safe_sectors): Handle non-512B sectors.
(grub_biosdisk_read): Remove special CDROM handling. Handle non-512B
sectors.
(grub_biosdisk_write): Handle non-512B sectors.
* grub-core/disk/scsi.c (grub_scsi_open): Fill log_sector_size.
(grub_scsi_read): Remove special non-512B block handling (now handled
one level up).
* grub-core/kern/disk.c (grub_disk_open): Fill default log_sector_size
and do sanity checks.
(grub_disk_adjust_range): Handle non-512B sectors.
(transform_sector): New function.
(grub_disk_read_small): Likewise.
(grub_disk_read): Rewritten.
(grub_disk_write): Handle non-512B sectors.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Fill
log_sector_size.
(open_device): Use log_sector_size.
(grub_util_biosdisk_read): Likewise.
(grub_util_biosdisk_write): Likewise.
* grub-core/partmap/msdos.c (grub_partition_msdos_iterate): Handle
non-512B sectors.
(pc_partition_map_embed): Likewise.
* include/grub/disk.h (grub_disk): New field log_sector_size.
(GRUB_DISK_CACHE_SIZE): Redefined from GRUB_DISK_CACHE_BITS.
(GRUB_DISK_CACHE_BITS): Increased to 6.
* util/grub-fstest.c (fstest): New command testload.
(argp_parser): Likewise.

1  2 
ChangeLog

diff --cc ChangeLog
index 043b858a5c428b04fa64612193948cf2cd4858b7,043b858a5c428b04fa64612193948cf2cd4858b7..e3ed5d13a43c6336ac95dc6b839126a75378deb6
+++ b/ChangeLog
@@@ -1,3 -1,3 +1,44 @@@
++2011-06-23  Vladimir Serbinenko  <phcoder@gmail.com>
++
++      Support non-512B sectors and agglomerate reads.
++
++      * Makefile.util.def (libgrubmods.a): Add grub-core/commands/testload.c.
++      * grub-core/disk/efi/efidisk.c (grub_efidisk_data): Remove disk_io.
++      (disk_io_guid): Removed.
++      (make_devices): Locate solely by BlockIO.
++      (grub_efidisk_open): Fill log_sector_size and total_sectors.
++      (grub_efidisk_read): Use read_blocks.
++      (grub_efidisk_write): Use write_blocks.
++      * grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Fill
++      log_sector_size.
++      (get_safe_sectors): Handle non-512B sectors.
++      (grub_biosdisk_read): Remove special CDROM handling. Handle non-512B
++      sectors.
++      (grub_biosdisk_write): Handle non-512B sectors.
++      * grub-core/disk/scsi.c (grub_scsi_open): Fill log_sector_size.
++      (grub_scsi_read): Remove special non-512B block handling (now handled
++      one level up).
++      * grub-core/kern/disk.c (grub_disk_open): Fill default log_sector_size
++      and do sanity checks.
++      (grub_disk_adjust_range): Handle non-512B sectors.
++      (transform_sector): New function.
++      (grub_disk_read_small): Likewise.
++      (grub_disk_read): Rewritten.
++      (grub_disk_write): Handle non-512B sectors.
++      * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Fill
++      log_sector_size.
++      (open_device): Use log_sector_size.
++      (grub_util_biosdisk_read): Likewise.
++      (grub_util_biosdisk_write): Likewise.
++      * grub-core/partmap/msdos.c (grub_partition_msdos_iterate): Handle
++      non-512B sectors.
++      (pc_partition_map_embed): Likewise.
++      * include/grub/disk.h (grub_disk): New field log_sector_size.
++      (GRUB_DISK_CACHE_SIZE): Redefined from GRUB_DISK_CACHE_BITS.
++      (GRUB_DISK_CACHE_BITS): Increased to 6.
++      * util/grub-fstest.c (fstest): New command testload.
++      (argp_parser): Likewise.
++
  2011-06-16  Robert Millan  <rmh@gnu.org>
  
        Detect `ataraid' devices on GNU/kFreeBSD.  Fix for ATA devices using