[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] 64 bit disk address support (= 8192EiB disks)
From: |
Timothy Baldwin |
Subject: |
Re: [patch] 64 bit disk address support (= 8192EiB disks) |
Date: |
Sat, 29 Oct 2005 02:15:55 +0100 |
User-agent: |
KMail/1.8.2 |
On Friday 28 Oct 2005 04:01, Yoshinori K. Okuji wrote:
> On Saturday 22 October 2005 01:53 pm, Timothy Baldwin wrote:
> > That is exactly my point. POSIX uses off_t as a byte counts into files,
> > the type we are discussing the name of is used for sector counts.
>
> OK. That makes sense.
>
> However, I do not like grub_sector_t. For me, this is still an address or
> an offset. So it should be called something like grub_disk_addr_t or
> grub_sector_offset_t.
grub_disk_addr_t then? Revised patch at:
http://www.majoroak.f2s.com/tim/grub/patches/grub2-patch14c.diff.gz
Also fixed a dependency on my RISC OS patches.
2005-10-30 Timothy Baldwin <address@hidden>
Use 64bit disk addresses.
* disk/i386/pc/biosdisk.c: Include limits.h.
(grub_biosdisk_rw): Use grub_disk_addr_t for sector parameter.
Truncate sector to 32 bits for CHS calculation.
(grub_biosdisk_read): Use grub_disk_addr_t for sector parameter.
Avoid 64 bit division calculating len by setting to 100 if
sector >= 0x100000000.
(grub_biosdisk_write): Likewise.
* disk/ieee1275/ofdisk.c (grub_ofdisk_read): Use
grub_disk_addr_t for disk addresses.
(grub_ofdisk_write): Likewise.
* disk/loopback.c (grub_loopback_read): Likewise.
(grub_loopback_write): Likewise.
* include/grub/partition.h (struct grub_partition): Likewise.
(grub_partition_get_start): Likewise.
(grub_partition_get_len): Likewise.
* include/grub/disk.h (struct grub_disk_dev): Likewise.
(struct grub_disk): Likewise.
(grub_disk_read): Likewise.
(grub_disk_write): Likewise.
* include/grub/file.h (struct grub_file): Likewise.
* kern/disk.c (struct grub_disk_cache): Likewise.
(grub_disk_cache_invalidate): Likewise.
(grub_disk_cache_fetch): Likewise.
(grub_disk_cache_unlock): Likewise.
(grub_disk_cache_store): Likewise.
(grub_disk_check_range): Likewise.
(grub_disk_read): Likewise.
(grub_disk_write): Likewise.
* util/i386/pc/biosdisk.c (open_device): Likewise.
(grub_util_biosdisk_read): Likewise.
(grub_util_biosdisk_write): Likewise.
* util/i386/pc/grub-setup.c (save_first_sector): Use
grub_disk_addr_t for sector parameter. Error if disk address
above or equal to 0x100000000.
(save_blocklists): Likewise, and cast disk addresses
to unsigned for display.
* fs/affs.c (grub_affs_read_file): Use grub_disk_addr_t
for disk address parameter of hook function.
* fs/ext2.c (grub_ext2_read_file): Likewise.
* fs/fat.c (grub_fat_read_file): Likewise.
* fs/fshelp.c (grub_fshelp_read_file): Likewise.
* fs/hfs.c (grub_hfs_read_file): Likewise.
* fs/jfs.c (grub_jfs_read_file): Likewise.
* fs/minux.c (grub_minux_read_file): Likewise.
* fs/sfs.c (grub_sfs_read_file): Likewise.
* fs/ufs.c (grub_ufs_read_file): Likewise.
* fs/xfs.c (grub_xfs_read_file): Likewise.
* include/grub/fshelp.h (grub_fshelp_read_file): Likewise.
* partmap/amiga.c (amiga_partition_map_iterate): Use 64 bit
arithmetic to calculate disk addresses.
* partmap/sun.c (sun_partition_map_iterate): Likewise.
* partmap/pc.c (pc_partition_map_iterate): Cast disk addresses
to unsigned for display.
* include/grub/types.h (grub_disk_addr_t): New typedef.
--
Member AFFS, WYLUG, SWP (UK), UAF, RESPECT, StWC
No to software patents! Victory to the iraqi resistance!
pgpYNi2oH5PA_.pgp
Description: PGP signature
- [patch] 64 bit disk address support (= 8192EiB disks), Timothy Baldwin, 2005/10/21
- Re: [patch] 64 bit disk address support (= 8192EiB disks), Marco Gerards, 2005/10/21
- Re: [patch] 64 bit disk address support (= 8192EiB disks), Yoshinori K. Okuji, 2005/10/21
- Re: [patch] 64 bit disk address support (= 8192EiB disks), Marco Gerards, 2005/10/21
- Re: [patch] 64 bit disk address support (= 8192EiB disks), Timothy Baldwin, 2005/10/21
- Re: [patch] 64 bit disk address support (= 8192EiB disks), Yoshinori K. Okuji, 2005/10/21
- Re: [patch] 64 bit disk address support (= 8192EiB disks), Timothy Baldwin, 2005/10/22
- Re: [patch] 64 bit disk address support (= 8192EiB disks), Yoshinori K. Okuji, 2005/10/27
- Re: [patch] 64 bit disk address support (= 8192EiB disks),
Timothy Baldwin <=
Re: [patch] 64 bit disk address support (= 8192EiB disks), Timothy Baldwin, 2005/10/23